-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
*/ | ||
async getSignerFee() { | ||
return toBN(await this.contract.methods.signerFee().call()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
src/Deposit.js
Outdated
* Get the signer fee, to be paid at redemption. | ||
* @return {Promise<BN>} A promise to the signer fee for this deposit, in TBTC. | ||
*/ | ||
async getSignerFee() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although please include the unit in this method name, now that I think about it (getSatoshiSignerFee
or similar).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost Hungarian. 😉
Observation - the naming styles are a bit diverse across the board, we seem to prefer lowercase Tbtc for getters, and uppercase for minting.
- getSatoshiLotSize
- getSignerFee
- lotSizeTbtc
- auctionTBTCAmount
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all a mess.
It's clearer to denominate the fee in the method name itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good 👍
Add
getSignerFee
helper to Deposit.This line in tbtc-dapp fails with the new web3 tbtc.js. The new method call would be deposit.methods.signerFee().call(), although the line above uses a helper - I figure we should use one here too.
Convert redemptionCost BN to string
I found this while investigating our Discord bug. I didn't test this less-travelled code path of redemption.