Skip to content

Commit

Permalink
set Fantom max fee to 250 FTM
Browse files Browse the repository at this point in the history
  • Loading branch information
mholtzman committed Oct 7, 2021
1 parent e833f43 commit c74faa7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function maxFee (tx = { chainId: '' }) {
return 2 * 1e18
}

// for Fantom, the max fee should be 1,000 FTM
// for Fantom, the max fee should be 250 FTM
if ([250, 4002].includes(chainId)) {
return 1000 * 1e18
return 250 * 1e18
}

// for all other chains, default to 10 of the chain's currency
Expand Down
4 changes: 2 additions & 2 deletions main/transaction/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ function maxFee (rawTx: RawTransaction) {
return 2 * 1e18
}

// for Fantom, the max fee should be 1,000 FTM
// for Fantom, the max fee should be 250 FTM
if ([250, 4002].includes(chainId)) {
return 1000 * 1e18
return 250 * 1e18
}

// for all other chains, default to 10 of the chain's currency
Expand Down
2 changes: 1 addition & 1 deletion test/main/transaction/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe('#maxFee', () => {
chainId: addHexPrefix((250).toString(16))
}

expect(maxFee(tx)).toBe(1e21)
expect(maxFee(tx)).toBe(250e18)
})

it('sets the max fee as 10 on other chains', () => {
Expand Down

0 comments on commit c74faa7

Please sign in to comment.