@@ -101,7 +101,7 @@ async function claimPointFromInvite({
101101 web3,
102102 contracts,
103103 onUpdate,
104− transferEth,
104+ transferEth = false,
105105}) {
106106 const askForFunding = (address, minBalance, balance) =>
107107 onUpdate({
@@ -122,11 +122,12 @@ async function claimPointFromInvite({
122122
123123 // transfer to invite wallet, so it can configure
124124 //NOTE doing this in the invite wallet instead of the final wallet makes
125− // failure cases "solvable" by just telling the user to fully retry
125+ // failure cases "solvable" by just telling the user to fully retry.
126+ // in other words, the invite flow is effectively idempotent.
126127
127128 //TODO no harm done if we already owned it, but should still get a bool arg
128129 // for skipping this, if it isn't too big a burden for callers
129− let transferTmpTx = azimuth.ecliptic.transferPoint(
130+ const transferTmpTx = azimuth.ecliptic.transferPoint(
130131 contracts,
131132 point,
132133 inviteAddress,
@@ -153,7 +154,7 @@ async function claimPointFromInvite({
153154
154155 const networkKeys = kg.deriveNetworkKeys(networkSeed);
155156
156− let keysTx = azimuth.ecliptic.configureKeys(
157+ const keysTx = azimuth.ecliptic.configureKeys(
157158 contracts,
158159 point,
159160 addHexPrefix(networkKeys.crypt.public),
@@ -165,7 +166,7 @@ async function claimPointFromInvite({
165166
166167 // configure management proxy
167168
168− let managementTx = azimuth.ecliptic.setManagementProxy(
169+ const managementTx = azimuth.ecliptic.setManagementProxy(
169170 contracts,
170171 point,
171172 wallet.management.keys.address
@@ -178,7 +179,7 @@ async function claimPointFromInvite({
178179 if (
179180 azimuth.azimuth.getPointSize(point) !== azimuth.azimuth.PointSize.Planet
180181 ) {
181− let spawnTx = azimuth.ecliptic.setSpawnProxy(
182+ const spawnTx = azimuth.ecliptic.setSpawnProxy(
182183 contracts,
183184 point,
184185 wallet.spawn.keys.address
@@ -189,7 +190,7 @@ async function claimPointFromInvite({
189190 if (
190191 azimuth.azimuth.getPointSize(point) === azimuth.azimuth.PointSize.Galaxy
191192 ) {
192− let votingTx = azimuth.ecliptic.setVotingProxy(
193+ const votingTx = azimuth.ecliptic.setVotingProxy(
193194 contracts,
194195 point,
195196 wallet.voting.keys.address
@@ -201,7 +202,7 @@ async function claimPointFromInvite({
201202
202203 // transfer configured point to user's new wallet
203204
204− let transferFinalTx = azimuth.ecliptic.transferPoint(
205+ const transferFinalTx = azimuth.ecliptic.transferPoint(
205206 contracts,
206207 point,
207208 wallet.ownership.keys.address,
@@ -250,7 +251,6 @@ async function claimPointFromInvite({
250251 askForFunding,
251252 gotFunding
252253 );
253− console.log('used tank', usedTank);
254254
255255 //
256256 // sending and awaiting transactions
@@ -258,9 +258,7 @@ async function claimPointFromInvite({
258258
259259 progress(TRANSACTION_STATES.CLAIMING);
260260
261− console.log('sending txpairs', txPairs.length);
262261 await sendAndAwaitConfirm(web3, txPairs.map(p => Just(p.signed)), usedTank);
263− console.log('all done');
264262
265263 //
266264 // move leftover eth
@@ -275,7 +273,6 @@ async function claimPointFromInvite({
275273 const sendEthCost = gasPrice * gasLimit;
276274 if (transferEth && balance > sendEthCost) {
277275 const value = balance - sendEthCost;
278− console.log('sending', value);
279276 const tx = {
280277 to: wallet.ownership.keys.address,
281278 value: value,
@@ -289,7 +286,6 @@ async function claimPointFromInvite({
289286 web3.eth.sendSignedTransaction(rawTx).catch(err => {
290287 console.log('error sending value tx, who cares', err);
291288 });
292− console.log('sent old balance');
293289 }
294290
295291 progress(TRANSACTION_STATES.DONE);