Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional parameter to pass gas amount #101

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Conversation

jessgusclark
Copy link
Member

@jessgusclark jessgusclark commented Nov 9, 2023

Adds a parameter to pass the amount of gas used to send the payment token from the UX to the SDK.

Usage, from the UX, the Confirm Modal:

const confirmObject: OverriddableTransactionOptions = {
      gasPrice: BigNumber.from(gasPrice),
      gasLimit: BigNumber.from(gasLimit),
      tokenPayment: {
        tokenContract: feeContract,
        tokenAmount: txCostInRif,
        tokenGasIncrease: 1.1, // 10%
     },
}

The key here is going to be to see what percentage we need to increase it for USDRIF. I suspect this is happening because USDRIF is a proxy contract and so we are not calling transfer directly on the contract, but being passed through to a child contract.

@jessgusclark jessgusclark self-assigned this Nov 9, 2023
Copy link
Collaborator

@rodrigoncalves rodrigoncalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG

@jessgusclark jessgusclark merged commit e3dda04 into develop Nov 9, 2023
1 check passed
@jessgusclark
Copy link
Member Author

@rodrigoncalves Thanks, deployed here: @rsksmart/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants