@@ -12,6 +12,7 @@ import saveAs from 'file-saver';
12import { sendSignedTransaction, hexify } from './txn';
12import { sendSignedTransaction, hexify } from './txn';
13import { attemptNetworkSeedDerivation } from './keys';
13import { attemptNetworkSeedDerivation } from './keys';
14import { addHexPrefix, WALLET_TYPES } from './wallet';
14import { addHexPrefix, WALLET_TYPES } from './wallet';
15+import { GAS_LIMITS } from './constants';
16const INVITE_STAGES = {
17const INVITE_STAGES = {
17 INVITE_LOGIN: 'invite login',
18 INVITE_LOGIN: 'invite login',
@@ -131,7 +132,7 @@ async function claimPointFromInvite({
131 inviteAddress,
132 inviteAddress,
134− transferTmpTx.gas = 500000; //TODO can maybe be lower?
135+ transferTmpTx.gas = GAS_LIMITS.TRANSFER;
136 // configure networking public keys
137 // configure networking public keys
@@ -160,7 +161,7 @@ async function claimPointFromInvite({
163− keysTx.gas = 150000;
164+ keysTx.gas = GAS_LIMITS.CONFIGURE_KEYS;
165 // configure management proxy
166 // configure management proxy
@@ -169,7 +170,7 @@ async function claimPointFromInvite({
170 wallet.management.keys.address
171 wallet.management.keys.address
172− managementTx.gas = 200000;
173+ managementTx.gas = GAS_LIMITS.SET_PROXY;
174 // set spawn & voting proxies situationally
175 // set spawn & voting proxies situationally
@@ -182,7 +183,7 @@ async function claimPointFromInvite({
183 wallet.spawn.keys.address
184 wallet.spawn.keys.address
185− spawnTx.gas = 200000;
186+ spawnTx.gas = GAS_LIMITS.SET_PROXY;
186 txs.push(spawnTx);
187 txs.push(spawnTx);
@@ -193,7 +194,7 @@ async function claimPointFromInvite({
194 wallet.voting.keys.address
195 wallet.voting.keys.address
196− votingTx.gas = 200000;
197+ votingTx.gas = GAS_LIMITS.SET_PROXY;
197 txs.push(votingTx);
198 txs.push(votingTx);
@@ -206,7 +207,7 @@ async function claimPointFromInvite({
206 wallet.ownership.keys.address,
207 wallet.ownership.keys.address,
209− transferFinalTx.gas = 500000; //TODO can maybe be lower?
210+ transferFinalTx.gas = GAS_LIMITS.TRANSFER;
210 txs.push(transferFinalTx);
211 txs.push(transferFinalTx);