Skip to content

Commit

Permalink
Bump version.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessgusclark committed Jan 24, 2024
1 parent fada470 commit 71899db
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/rif-relay-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rsksmart/rif-relay-light-sdk",
"version": "1.0.17",
"version": "1.1.0",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
7 changes: 1 addition & 6 deletions packages/rif-relay-sdk/src/RifRelaySDK/RifRelaySDK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
import {
dataTypeFields,
getDomainSeparator,
INTERNAL_TRANSACTION_ESTIMATE_CORRECTION,
MAX_RELAY_NONCE_GAP,
validUntilTime,
ZERO_ADDRESS
Expand Down Expand Up @@ -123,11 +122,7 @@ export class RIFRelaySDK {
: estTokenGas

const estimated = await this.provider.estimateGas({ ...tx, gasPrice })
const correction =
estimated.toNumber() > INTERNAL_TRANSACTION_ESTIMATE_CORRECTION
? estimated.sub(INTERNAL_TRANSACTION_ESTIMATE_CORRECTION)
: estimated
const internalCallCost = Math.round(correction.toNumber() * 1.01)
const internalCallCost = Math.round(estimated.toNumber() * 1.01)
const updatedNonceWithPendingTxs = nonce.add(pendingTxsCount)

const relayRequest: RelayRequest = {
Expand Down
1 change: 0 additions & 1 deletion packages/rif-relay-sdk/src/RifRelaySDK/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const validUntilTime = () => Math.floor(Date.now() / 1000) + TWO_DAYS

export const MAX_RELAY_NONCE_GAP = 3
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
export const INTERNAL_TRANSACTION_ESTIMATE_CORRECTION = 20000
export const RIF_TOKEN_ADDRESS_TESTNET =
'0x19F64674D8A5B4E652319F5e239eFd3bc969A1fE'
export const TWO_RIF = BigNumber.from('2000000000000000000')
Expand Down

0 comments on commit 71899db

Please sign in to comment.