-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Description
Describe the bug
When asking a user to sign a feePayer transaction:
- The estimated balance changes for the user are incorrect.
- Relatedly, the user is not told that this is a feePayer transaction and someone else will be paying the gas.
- Maybe not related, but it's not clear where the total estimated balance changes is coming from - even if the wallet thought the sender was paying the gas, the amount seems off.
To Reproduce
Steps to reproduce the behavior:
I'm using @aptos-labs/wallet-adapter-react
with the @pontem/wallet-adapter-plugin
when making a React app.
- Submit a feePayer transaction for signature where the sender is transferring 0.00001 APT to another address.
const simpleTx = await aptosClient.transaction.build.simple({
sender: senderAddress,
withFeePayer: true,
data: {
function: "0x1::aptos_account::transfer",
functionArguments: ["0x630af550649eeb3a027363c9ea46ec81e8a43b9a3ff5dfb34c60ef8a1199e934", 1000],
},
});
const senderSig = await signTransaction(simpleTx); // ask for signature from Pontem wallet user
Expected behavior
- The correct amount the sender is going to lose is shown.
- Ideally, the sender would also see some indication that they are not the one paying the gas fee.
A non feePayer transaction looks the same (again, with total balance change number looking off to me):
Desktop (please complete the following information):
- OS: Mac OS 14.6.1
- Browser: Chrome v127.0.6533.100
- Pontem Crypto Wallet v2.6.13
Metadata
Metadata
Assignees
Labels
No labels