forked from Superalgos/Superalgos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now we will have 2 secrets files, one for Signing Accounts and the ot…
…her for APIs
- Loading branch information
1 parent
e26dae7
commit 1906f01
Showing
13 changed files
with
74 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
exports.newSecrets = function () { | ||
|
||
let thisObject = { | ||
initialize: initialize | ||
} | ||
|
||
return thisObject; | ||
|
||
function initialize() { | ||
|
||
SA.secrets = { | ||
signingAccountSecrets: { | ||
array: [], | ||
map: new Map() | ||
}, | ||
apisSecrets: { | ||
array: [], | ||
map: new Map() | ||
} | ||
} | ||
|
||
try { | ||
SA.secrets.signingAccountSecrets = require('./My-Secrets/SigningAccountsSecrets.json').secrets | ||
} catch (err) { | ||
// Still have an empty array. | ||
} | ||
|
||
try { | ||
SA.secrets.apisSecrets = require('./My-Secrets/ApisSecrets.json').secrets | ||
} catch (err) { | ||
// Still have an empty array. | ||
} | ||
|
||
for (let i = 0; i < SA.secrets.signingAccountSecrets.array.length; i++) { | ||
let secret = SA.secrets.signingAccountSecrets.array[i] | ||
SA.secrets.signingAccountSecrets.map.set(secret.nodeCodeName, secret) | ||
} | ||
|
||
for (let i = 0; i < SA.secrets.apisSecrets.array.length; i++) { | ||
let secret = SA.secrets.apisSecrets.array[i] | ||
SA.secrets.apisSecrets.map.set(secret.nodeCodeName, secret) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters