glifio / wallet

Glif Wallet

Home Page:https://wallet.glif.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

walletProvider.gasEstimateMessageGas call bug?

jbenet opened this issue · comments

According to:

I believe the second parameter in this call

await walletProvider.gasEstimateMessageGas(
    message,
    localTxFee.toAttoFil()
)

in https://github.com/glifio/wallet/blob/primary/components/Wallet/Send.js/CustomizeFee.jsx#L170 is a number when it should be an object wrapping the number: { "MaxFee": localTxFee.toAttoFil() }

await walletProvider.gasEstimateMessageGas(
    message,
    { "MaxFee": localTxFee.toAttoFil() }
)

I believe this means that the "Transaction Fee" field is not sending the right value to Lotus.GasEstimateMessageGas (probably landing as zero) which means that the "Transaction Fee" field is not taking effect.

commented

Hey @jbenet thank you for pointing this out! We should've more closely follow the lotus json rpc API when writing these wallet provider methods. You can see the MaxFee gets set in an object inside the function we're calling https://github.com/glifio/modules/blob/primary/packages/filecoin-wallet-provider/src/filecoin.ts#L185

Ah, awesome, thank you. sorry for misreport! couldn't find where this fed in. 👍