@@ -7,32 +7,25 @@ import * as more from 'more-entropy'
7import * as ob from 'urbit-ob'
7import * as ob from 'urbit-ob'
8import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
8import * as kg from '../../../node_modules/urbit-key-generation/dist/index'
9import * as tank from './tank'
9import * as tank from './tank'
10−import { MAX_GALAXY, MIN_STAR, MAX_STAR, MIN_PLANET,
10+import { MIN_STAR, MIN_PLANET, SEED_ENTROPY_BITS,
11 GALAXY_ENTROPY_BITS, STAR_ENTROPY_BITS, PLANET_ENTROPY_BITS,
11 GALAXY_ENTROPY_BITS, STAR_ENTROPY_BITS, PLANET_ENTROPY_BITS,
14 } from '../../walletgen/lib/constants'
12 } from '../../walletgen/lib/constants'
16import JSZip from 'jszip'
14import JSZip from 'jszip'
17import saveAs from 'file-saver'
15import saveAs from 'file-saver'
21− sendSignedTransaction,
22 waitForTransactionConfirm,
18 waitForTransactionConfirm,
23 isTransactionConfirmed
19 isTransactionConfirmed
24} from './txn'
20} from './txn'
25import { BRIDGE_ERROR } from './error'
21import { BRIDGE_ERROR } from './error'
26−import { attemptSeedDerivation, genKey } from './keys'
22+import { attemptSeedDerivation } from './keys'
29 addressFromSecp256k1Public,
24 addressFromSecp256k1Public,
30− urbitWalletFromTicket,
31 addHexPrefix,
25 addHexPrefix,
32 WALLET_NAMES
26 WALLET_NAMES
33} from './wallet'
27} from './wallet'
35−const NEXT_STEP_NUM = 6;
36const SEED_LENGTH_BYTES = SEED_ENTROPY_BITS / 8
29const SEED_LENGTH_BYTES = SEED_ENTROPY_BITS / 8
38const INVITE_STAGES = {
31const INVITE_STAGES = {
@@ -173,7 +166,7 @@ async function downloadWallet(paper) {
175async function startTransactions(args) {
168async function startTransactions(args) {
176− let { realPointM, web3M, contractsM, realTicket,
169+ let { realPointM, web3M, contractsM,
177 inviteWalletM, realWalletM, setUrbitWallet, updateProgress } = args
170 inviteWalletM, realWalletM, setUrbitWallet, updateProgress } = args
179 if (Nothing.hasInstance(web3M)) {
172 if (Nothing.hasInstance(web3M)) {
@@ -191,10 +184,12 @@ async function startTransactions(args) {
192 const inviteWallet = inviteWalletM.value;
185 const inviteWallet = inviteWalletM.value;
194− // if (Nothing.hasInstance(realWalletM)) {
187+ if (Nothing.hasInstance(realWalletM)) {
195− // throw BRIDGE_ERROR.MISSING_WALLET;
188+ throw BRIDGE_ERROR.MISSING_WALLET;
197− // const realWallet = realWalletM.value;
190+ const realWallet = realWalletM.value;
192+ // const realWallet = await urbitWalletFromTicket(args.realTicket, point);
199 if (Nothing.hasInstance(realPointM)) {
194 if (Nothing.hasInstance(realPointM)) {
200 throw BRIDGE_ERROR.MISSING_POINT;
195 throw BRIDGE_ERROR.MISSING_POINT;
@@ -204,8 +199,6 @@ async function startTransactions(args) {
204 const inviteAddress = addressFromSecp256k1Public(inviteWallet.publicKey);
199 const inviteAddress = addressFromSecp256k1Public(inviteWallet.publicKey);
205 console.log('working as', inviteAddress);
200 console.log('working as', inviteAddress);
207− const realWallet = await urbitWalletFromTicket(realTicket, point);
209 // transfer from invite wallet to new wallet
202 // transfer from invite wallet to new wallet
211 let transferTx = azimuth.ecliptic.transferPoint(contracts, point, realWallet.ownership.keys.address);
204 let transferTx = azimuth.ecliptic.transferPoint(contracts, point, realWallet.ownership.keys.address);
@@ -428,18 +421,6 @@ async function sendAndAwaitConfirm(web3, signedTxs) {
431−function awaitForResult(desired, retryTime, func) {
432− return new Promise((resolve, reject) => {
433− const retry = async () => {
434− const result = await func();
435− console.log('result vs desired', result, desired);
436− if (result === desired) resolve();
437− else setTimeout(retry, retryTime);
443function askForFunding(address, amount, current, updateProgress) {
424function askForFunding(address, amount, current, updateProgress) {
444 updateProgress({
425 updateProgress({
445 type: "notify",
426 type: "notify",