Skip to content

Commit e112573

Browse files
committed
re-fortmarted
1 parent 7a76440 commit e112573

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/codedataUtil.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
import CryptoJS from "crypto-js";
33

4-
const sharedKey = "50SUB39ctEKzd6Uv2a84lFK";
4+
55

66

77
export const generateRandomString = (length = 10) => {
@@ -27,12 +27,12 @@ export const basicGetURL = (url, onSuccess, onError) => {
2727
return;
2828
}
2929
if (request.status === 200) {
30-
try{
30+
try {
3131
onSuccess(JSON.parse(request.responseText));
3232
}
3333
catch (error) {
34-
onError("invalid processing the server response:"+error);
35-
console.log("server response:"+request.responseText);
34+
onError("invalid processing the server response:" + error);
35+
console.log("server response:" + request.responseText);
3636
}
3737
} else {
3838
onError('socket-server-url-status:' + request.status);
@@ -64,7 +64,7 @@ export const buildInputCodeData = (connector, data = {}) => {
6464
}
6565
};
6666

67-
67+
const sharedKey = "50SUB39ctEKzd6Uv2a84lFK";
6868
export const buildPairingData = (securityGroup, codeAES, data) => {
6969
const codedata = { securityGroup, codeAES, action: 'pairing', ...data };
7070
return "C" + encrypt("J" + JSON.stringify(codedata), sharedKey);

0 commit comments

Comments
 (0)