File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @rsksmart/rif-relay-light-sdk" ,
3
- "version" : " 1.0.17 " ,
3
+ "version" : " 1.1.0 " ,
4
4
"description" : " " ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import {
19
19
import {
20
20
dataTypeFields ,
21
21
getDomainSeparator ,
22
- INTERNAL_TRANSACTION_ESTIMATE_CORRECTION ,
23
22
MAX_RELAY_NONCE_GAP ,
24
23
validUntilTime ,
25
24
ZERO_ADDRESS
@@ -123,11 +122,7 @@ export class RIFRelaySDK {
123
122
: estTokenGas
124
123
125
124
const estimated = await this . provider . estimateGas ( { ...tx , gasPrice } )
126
- const correction =
127
- estimated . toNumber ( ) > INTERNAL_TRANSACTION_ESTIMATE_CORRECTION
128
- ? estimated . sub ( INTERNAL_TRANSACTION_ESTIMATE_CORRECTION )
129
- : estimated
130
- const internalCallCost = Math . round ( correction . toNumber ( ) * 1.01 )
125
+ const internalCallCost = Math . round ( estimated . toNumber ( ) * 1.01 )
131
126
const updatedNonceWithPendingTxs = nonce . add ( pendingTxsCount )
132
127
133
128
const relayRequest : RelayRequest = {
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ export const validUntilTime = () => Math.floor(Date.now() / 1000) + TWO_DAYS
35
35
36
36
export const MAX_RELAY_NONCE_GAP = 3
37
37
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
38
- export const INTERNAL_TRANSACTION_ESTIMATE_CORRECTION = 20000
39
38
export const RIF_TOKEN_ADDRESS_TESTNET =
40
39
'0x19F64674D8A5B4E652319F5e239eFd3bc969A1fE'
41
40
export const TWO_RIF = BigNumber . from ( '2000000000000000000' )
You can’t perform that action at this time.
0 commit comments