Skip to content

Incorrect balance change amount shown for feePayer transaction #18

@aaronTufts

Description

@aaronTufts

Describe the bug
When asking a user to sign a feePayer transaction:

  1. The estimated balance changes for the user are incorrect.
  2. Relatedly, the user is not told that this is a feePayer transaction and someone else will be paying the gas.
  3. 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.

  1. 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

  1. The correct amount the sender is going to lose is shown.
  2. Ideally, the sender would also see some indication that they are not the one paying the gas fee.

Screenshots
Screenshot 2024-08-13 at 10 18 07 AM

A non feePayer transaction looks the same (again, with total balance change number looking off to me):
Screenshot 2024-08-13 at 4 39 58 PM

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions