Last active
November 18, 2019 03:31
-
-
Save katat/34a407e2352e965fb22313f306ee7cb7 to your computer and use it in GitHub Desktop.
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
//update staged balance | |
for(const settlement of settlements.filter(s => s.isStageable)) { | |
await settlement.stage(wallet, {gasLimit, gasPrice}); | |
} | |
//withdraw all staged balance for a currency back to base layer | |
const stagedBalanceBN = await wallet.getNahmiiStagedBalance(tokenInfo.symbol); | |
const withdrawMonetaryAmount = nahmii.MonetaryAmount.from(stagedBalanceBN, tokenInfo.currency); | |
await wallet.withdraw(withdrawMonetaryAmount, {gasLimit, gasPrice}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment