Skip to content

Commit

Permalink
feat(suite): add eip1559 network feature
Browse files Browse the repository at this point in the history
  • Loading branch information
enjojoy committed Jan 17, 2025
1 parent 5bfb927 commit 7ab8b06
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 8 deletions.
55 changes: 48 additions & 7 deletions suite-common/wallet-config/src/networksConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const networks = {
'coin-definitions',
'nft-definitions',
'staking',
'eip1559',
],
backendTypes: ['blockbook'],
accountTypes: {
Expand Down Expand Up @@ -87,7 +88,15 @@ export const networks = {
decimals: 18,
testnet: false,
explorer: getExplorerUrls('https://pol1.trezor.io', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'coin-definitions', 'nft-definitions'],
features: [
'rbf',
'sign-verify',
'tokens',
'nfts',
'coin-definitions',
'nft-definitions',
'eip1559',
],
backendTypes: ['blockbook'],
accountTypes: {
ledger: {
Expand All @@ -111,7 +120,15 @@ export const networks = {
decimals: 18,
testnet: false,
explorer: getExplorerUrls('https://bsc1.trezor.io', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'coin-definitions', 'nft-definitions'],
features: [
'rbf',
'sign-verify',
'tokens',
'nfts',
'coin-definitions',
'nft-definitions',
'eip1559',
],
backendTypes: ['blockbook'],
accountTypes: {
ledger: {
Expand All @@ -135,7 +152,15 @@ export const networks = {
decimals: 18,
testnet: false,
explorer: getExplorerUrls('https://arbiscan.io', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'coin-definitions', 'nft-definitions'],
features: [
'rbf',
'sign-verify',
'tokens',
'nfts',
'coin-definitions',
'nft-definitions',
'eip1559',
],
backendTypes: ['blockbook'],
accountTypes: {
ledger: {
Expand All @@ -159,7 +184,15 @@ export const networks = {
decimals: 18,
testnet: false,
explorer: getExplorerUrls('https://basescan.org', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'coin-definitions', 'nft-definitions'],
features: [
'rbf',
'sign-verify',
'tokens',
'nfts',
'coin-definitions',
'nft-definitions',
'eip1559',
],
backendTypes: ['blockbook'],
accountTypes: {
ledger: {
Expand All @@ -183,7 +216,15 @@ export const networks = {
decimals: 18,
testnet: false,
explorer: getExplorerUrls('https://optimistic.etherscan.io', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'coin-definitions', 'nft-definitions'],
features: [
'rbf',
'sign-verify',
'tokens',
'nfts',
'coin-definitions',
'nft-definitions',
'eip1559',
],
backendTypes: ['blockbook'],
accountTypes: {
ledger: {
Expand Down Expand Up @@ -537,7 +578,7 @@ export const networks = {
decimals: 18,
testnet: true,
explorer: getExplorerUrls('https://sepolia1.trezor.io', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'nft-definitions'],
features: ['rbf', 'sign-verify', 'tokens', 'nfts', 'nft-definitions', 'eip1559'],
backendTypes: ['blockbook'],
accountTypes: {},
coingeckoId: undefined,
Expand All @@ -553,7 +594,7 @@ export const networks = {
decimals: 18,
testnet: true,
explorer: getExplorerUrls('https://holesky1.trezor.io', 'ethereum'),
features: ['rbf', 'sign-verify', 'tokens', 'staking', 'nfts', 'nft-definitions'],
features: ['rbf', 'sign-verify', 'tokens', 'staking', 'nfts', 'nft-definitions', 'eip1559'],
backendTypes: ['blockbook'],
accountTypes: {},
coingeckoId: undefined,
Expand Down
3 changes: 2 additions & 1 deletion suite-common/wallet-config/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ export type NetworkFeature =
| 'tokens'
| 'staking'
| 'coin-definitions'
| 'nft-definitions';
| 'nft-definitions'
| 'eip1559';

type Level = `/${number}'`;
type MaybeApostrophe = `'` | '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ describe('account utils', () => {
'coin-definitions',
'nft-definitions',
'staking',
'eip1559',
]);
expect(getNetworkAccountFeatures(coinjoinAcc)).toEqual(['rbf', 'amount-unit']);
// when account does not have features defined, take them from root network object
Expand Down

0 comments on commit 7ab8b06

Please sign in to comment.