@@ -52,13 +52,38 @@ const WALLET_STATES = {
5252}
5353
5454const TRANSACTION_STATES = {
55− GENERATING: 'Generating transactions',
56− SIGNING: 'Signing transactions',
57− FUNDING: 'Funding transactions',
58− CLAIMING: 'Claiming invite',
59− CONFIGURING: 'Configuring planet',
60− CLEANING: 'Cleaning up',
61− DONE: 'Done'
55+ GENERATING: {
56+ label: 'Generating transactions',
57+ pct: "0%"
58+ },
59+ SIGNING: {
60+ label: 'Signing transactions',
61+ pct: "15%"
62+ },
63+ FUNDING_INVITE: {
64+ label: 'Funding invite wallet',
65+ pct: "30%"
66+ },
67+ CLAIMING: {
68+ label: 'Claiming invite',
69+ pct: "55%"
70+ },
71+ FUNDING_RECIPIENT: {
72+ label: 'Funding recipient wallet',
73+ pct: "65%"
74+ },
75+ CONFIGURING: {
76+ label: 'Configuring planet',
77+ pct: "85%"
78+ },
79+ CLEANING: {
80+ label: 'Cleaning up',
81+ pct: "95%"
82+ },
83+ DONE: {
84+ label: 'Done',
85+ pct: "100%"
86+ },
6287}
6388
6489async function generateWallet(point) {
@@ -198,7 +223,7 @@ async function startTransactions(args) {
198223 let rawTransferStx = '0x'+transferStx.serialize().toString('hex');
199224
200225 const transferCost = transferTx.gas * transferTx.gasPrice;
201− await ensureFundsFor(web3, point, inviteAddress, transferCost, [rawTransferStx], updateProgress);
226+ await ensureFundsFor(web3, point, inviteAddress, transferCost, [rawTransferStx], updateProgress, true);
202227
203228 // send transaction
204229 updateProgress(TRANSACTION_STATES.CLAIMING);
@@ -258,7 +283,7 @@ async function startTransactions(args) {
258283 return '0x'+stx.serialize().toString('hex');
259284 });
260285
261− await ensureFundsFor(web3, point, newAddress, totalCost, rawStxs, updateProgress);
286+ await ensureFundsFor(web3, point, newAddress, totalCost, rawStxs, updateProgress, false);
262287
263288 updateProgress(TRANSACTION_STATES.CONFIGURING);
264289 await sendAndAwaitConfirm(web3, rawStxs);
@@ -294,8 +319,10 @@ async function startTransactions(args) {
294319 //TODO forward to "all done!" screen
295320}
296321
297−async function ensureFundsFor(web3, point, address, cost, signedTxs, updateProgress) {
298− updateProgress(TRANSACTION_STATES.FUNDING);
322+async function ensureFundsFor(web3, point, address, cost, signedTxs, updateProgress, firstTx) {
323+ let fundingState = firstTx? TRANSACTION_STATES.FUNDING_INVITE : TRANSACTION_STATES.FUNDING_RECIPIENT
324+
325+ updateProgress(fundingState);
299326 let balance = await web3.eth.getBalance(address);
300327
301328 if (cost > balance) {