Created
November 17, 2019 08:13
-
-
Save katat/d21eab36c0204c7ca003fdc3c481e8c8 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
//specify the currency, amount and the recipient address | |
const payMonetaryAmount = nahmii.MonetaryAmount.from({ | |
currency: { | |
ct: tokenInfo.currency, | |
id: '0' | |
}, | |
amount: ethers.utils.parseUnits(payAmount, tokenInfo.decimals) | |
}); | |
const payment = new nahmii.Payment(payMonetaryAmount, wallet.address, recipientAddress, wallet); | |
//sign the transfer transaction using the wallet initiated the Payment object | |
await payment.sign(); | |
//send the signed payment to our operator, it will response a receipt | |
await payment.register(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment