You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/utils/walletActionPopups.js
+38-6Lines changed: 38 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ const ethereumLedgerPopup = {
26
26
]
27
27
}
28
28
29
-
constledgerERC20Popup={
29
+
constERC20LedgerPopup={
30
30
steps: [
31
31
{id: WALLET_ACTION_STEPS.SIGN,title: 'On your Ledger',type: 'Ethereum',label: 'Sign Message',description: 'View displayed hash, then sign',image: require('../icons/wallets/ledger/device.svg')},
32
32
{id: WALLET_ACTION_STEPS.CONFIRM,title: 'On your Ledger',type: 'Ethereum',label: 'Confirm Transactions',description: 'Sign 2 transactions to confirm. Expect a lag in between them.',image: require('../icons/wallets/ledger/device.svg')}
@@ -47,6 +47,20 @@ const ERC20MetamaskPopup = {
47
47
]
48
48
}
49
49
50
+
constdefaultPopup={
51
+
steps: [
52
+
{id: WALLET_ACTION_STEPS.SIGN,title: 'On Your Wallet',label: 'Sign Message',description: 'View displayed hash, then sign'},
53
+
{id: WALLET_ACTION_STEPS.CONFIRM,title: 'On Your Wallet',label: 'Confirm Transaction',description: 'Confirm the transaction.'}
54
+
]
55
+
}
56
+
57
+
constdefaultERC20Popup={
58
+
steps: [
59
+
{id: WALLET_ACTION_STEPS.SIGN,title: 'On Your Wallet',label: 'Sign Message',description: 'View displayed hash, then sign'},
60
+
{id: WALLET_ACTION_STEPS.CONFIRM,title: 'On Your Wallet',label: 'Confirm Transactions',description: 'Sign 2 transactions to confirm. After the first confirmation there is a lag before the MetaMask popup displays again.'}
61
+
]
62
+
}
63
+
50
64
functiontoClaimPopup(popup){
51
65
return{steps: popup.steps.map(step=>{
52
66
returnstep.id===WALLET_ACTION_STEPS.CONFIRM ? {...step,description: 'Confirm to claim your assets.'} : step
@@ -63,11 +77,16 @@ const initiatePopups = {
63
77
ledger: {
64
78
btc: bitcoinLedgerPopup,
65
79
eth: ethereumLedgerPopup,
66
-
erc20: ledgerERC20Popup
80
+
erc20: ERC20LedgerPopup
67
81
},
68
82
metamask: {
69
83
eth: ethereumMetamaskPopup,
70
84
erc20: ERC20MetamaskPopup
85
+
},
86
+
default: {
87
+
btc: defaultPopup,
88
+
eth: defaultPopup,
89
+
erc20: defaultERC20Popup
71
90
}
72
91
}
73
92
@@ -80,6 +99,11 @@ const claimPopups = {
80
99
metamask: {
81
100
eth: toClaimPopup(ethereumMetamaskPopup),
82
101
erc20: toClaimPopup(ERC20MetamaskPopup)
102
+
},
103
+
default: {
104
+
btc: toClaimPopup(defaultPopup),
105
+
eth: toClaimPopup(defaultPopup),
106
+
erc20: toClaimPopup(defaultERC20Popup)
83
107
}
84
108
}
85
109
@@ -92,6 +116,11 @@ const refundPopups = {
92
116
metamask: {
93
117
eth: toRefundPopup(ethereumMetamaskPopup),
94
118
erc20: toRefundPopup(ERC20MetamaskPopup)
119
+
},
120
+
default: {
121
+
btc: toRefundPopup(defaultPopup),
122
+
eth: toRefundPopup(defaultPopup),
123
+
erc20: toRefundPopup(defaultERC20Popup)
95
124
}
96
125
}
97
126
@@ -104,11 +133,14 @@ const popups = {
104
133
// TODO: make more generic to cover all wallet types
0 commit comments