Skip to content

Commit

Permalink
add wait time for loading new nonce for safe, marketclosure address
Browse files Browse the repository at this point in the history
  • Loading branch information
jacko125 committed Apr 6, 2020
1 parent 2c88718 commit 0151779
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ const getUsers = ({ network = 'mainnet', user } = {}) => {
const base = {
owner: testnetOwner,
deployer: testnetOwner,
marketClosure: testnetOwner,
oracle: '0xac1e8B385230970319906C03A1d8567e3996d1d5',
fee: '0xfeEFEEfeefEeFeefEEFEEfEeFeefEEFeeFEEFEeF',
zero: '0x' + '0'.repeat(40),
Expand All @@ -79,6 +80,7 @@ const getUsers = ({ network = 'mainnet', user } = {}) => {
mainnet: Object.assign({}, base, {
owner: '0xEb3107117FEAd7de89Cd14D463D340A2E6917769',
deployer: '0xDe910777C787903F78C89e7a0bf7F4C435cBB1Fe',
marketClosure: '0xC105Ea57Eb434Fbe44690d7Dec2702e4a2FBFCf7',
oracle: '0xaC1ED4Fabbd5204E02950D68b6FC8c446AC95362',
}),
kovan: Object.assign({}, base),
Expand Down
4 changes: 4 additions & 0 deletions publish/src/safe-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,10 @@ const createAndSaveApprovalTransaction = async ({
// Check that newTxNonce from API has updated
while (lastNonce === newNonce) {
console.log(yellow(`Retry getNewTxNonce as lastNonce === new nonce`));

// add short delay to give gnosis safe api a chance to update
await new Promise(resolve => setTimeout(resolve, 1000));

lastTx = await getLastTx({
network,
safeAddress: safeContract.options.address,
Expand Down

0 comments on commit 0151779

Please sign in to comment.