Skip to content

Commit 9d7c062

Browse files
chk0912sreblock
andauthored
Setting minimum tip for BNB transactions (#660)
* Setting minimum tip for BNB transactions * docs --------- Co-authored-by: Rodrigo <10286502+rodr-r@users.noreply.github.com> Co-authored-by: sre <98833290+sreblock@users.noreply.github.com>
1 parent e89d06e commit 9d7c062

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

packages/background/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@block-wallet/background",
3-
"version": "1.1.23",
3+
"version": "1.1.24",
44
"private": true,
55
"dependencies": {
66
"@block-wallet/chains-assets": "https://github.com/block-wallet/chains-assets#v0.0.57",

packages/background/src/infrastructure/stores/migrator/migrations/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ import migration70 from './migration-70';
7272
import migration71 from './migration-71';
7373
import migration72 from './migration-72';
7474
import migration73 from './migration-73';
75+
import migration74 from './migration-74';
7576

7677
const migrations: IMigration[] = [
7778
migration01,
@@ -147,6 +148,7 @@ const migrations: IMigration[] = [
147148
migration71,
148149
migration72,
149150
migration73,
151+
migration74,
150152
];
151153

152154
export default (): IMigration[] => migrations;
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { BlankAppState } from '../../../../utils/constants/initialState';
2+
import { IMigration } from '../IMigration';
3+
import { BigNumber } from '@ethersproject/bignumber';
4+
5+
/**
6+
* This migration updates the gas lower cap for bnb
7+
*/
8+
export default {
9+
migrate: async (persistedState: BlankAppState) => {
10+
const { availableNetworks } = persistedState.NetworkController;
11+
const updatedNetworks = { ...availableNetworks };
12+
13+
updatedNetworks['BSC'] = {
14+
...updatedNetworks['BSC'],
15+
gasLowerCap: {
16+
maxPriorityFeePerGas: BigNumber.from('3000000000'), // 3 GWEI,
17+
},
18+
};
19+
20+
return {
21+
...persistedState,
22+
NetworkController: {
23+
...persistedState.NetworkController,
24+
availableNetworks: { ...updatedNetworks },
25+
},
26+
};
27+
},
28+
version: '1.1.24',
29+
} as IMigration;

packages/background/src/utils/constants/networks.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ export const INITIAL_NETWORKS: Networks = {
303303
derivationsForward: DERIVATIONS_FORWARD,
304304
},
305305
nativelySupported: true,
306+
gasLowerCap: {
307+
maxPriorityFeePerGas: BigNumber.from('3000000000'), // 3 GWEI,
308+
},
306309
},
307310
POLYGON: {
308311
name: 'polygon',

0 commit comments

Comments
 (0)