Skip to content

Commit

Permalink
fix topWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
serdiukov-o-nordwhale committed Sep 15, 2020
1 parent b965937 commit b9edde8
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/server/blockchain/AdminWallet.js
Expand Up @@ -313,17 +313,11 @@ export class Wallet {
txHash = hash
}

const timeoutRace = () => {
const txPromise = this.sendTransaction(this.proxyContract.methods.whitelist(address, did), {
onTransactionHash
})
return txPromise
}

let tx = await this.retryTimeout(timeoutRace)
const makeTx = () => this.proxyContract.methods.whitelist(address, did)
const result = await retryTimeout(() => this.sendTransaction(makeTx(), { onTransactionHash }))

log.info('Whitelisted user', { txHash, address, did, tx })
return tx
log.info('Whitelisted user', { txHash, address, did, result })
return result
} catch (exception) {
const { message } = exception

Expand Down

0 comments on commit b9edde8

Please sign in to comment.