on master help sign in
Use conventional names for non-maybe store values
fe527daFang
src/views/Login.js+6−6
@@ -44,22 +44,22 @@ export default function Login() {
44 }, []);
44 }, []);
45
45
46 const doContinue = async () => {
46 const doContinue = async () => {
47− const realWallet = need.wallet(wallet);
47+ const _wallet = need.wallet(wallet);
48− const realContracts = need.contracts(contracts);
48+ const _contracts = need.contracts(contracts);
49
49
50 // if no point cursor set by login logic, try to deduce it
50 // if no point cursor set by login logic, try to deduce it
51 let deduced = Nothing();
51 let deduced = Nothing();
52 if (Nothing.hasInstance(pointCursor)) {
52 if (Nothing.hasInstance(pointCursor)) {
53 const owned = await azimuth.azimuth.getOwnedPoints(
53 const owned = await azimuth.azimuth.getOwnedPoints(
54− realContracts,
54+ _contracts,
55− realWallet.address
55+ _wallet.address
56 );
56 );
57 if (owned.length === 1) {
57 if (owned.length === 1) {
58 deduced = Just(owned[0]);
58 deduced = Just(owned[0]);
59 } else if (owned.length === 0) {
59 } else if (owned.length === 0) {
60 const canOwn = await azimuth.azimuth.getTransferringFor(
60 const canOwn = await azimuth.azimuth.getTransferringFor(
61− realContracts,
61+ _contracts,
62− realWallet.address
62+ _wallet.address
63 );
63 );
64 if (canOwn.length === 1) {
64 if (canOwn.length === 1) {
65 deduced = Just(canOwn[0]);
65 deduced = Just(canOwn[0]);
src/views/Login/Keystore.js+2−2
@@ -30,9 +30,9 @@ export default function Keystore({ loginCompleted }) {
30 const json = JSON.parse(text);
30 const json = JSON.parse(text);
31 const privateKey = keythereum.recover(password, json);
31 const privateKey = keythereum.recover(password, json);
32
32
33− const wallet = new EthereumWallet(privateKey);
33+ const newWallet = new EthereumWallet(privateKey);
34 setDecryptionProblem(false);
34 setDecryptionProblem(false);
35− setWallet(Just(wallet));
35+ setWallet(Just(newWallet));
36 } catch (err) {
36 } catch (err) {
37 setDecryptionProblem(true);
37 setDecryptionProblem(true);
38 setWallet(Nothing());
38 setWallet(Nothing());
src/views/Login/Ticket.js+3−3
@@ -49,16 +49,16 @@ export default function Ticket({ advanced, loginCompleted }) {
49 return;
49 return;
50 }
50 }
51 setTicketStatus(Just(INPUT_STATUS.SPIN));
51 setTicketStatus(Just(INPUT_STATUS.SPIN));
52− const realContracts = need.contracts(contracts);
52+ const _contracts = need.contracts(contracts);
53 const pointNumber = ob.patp2dec(pointName);
53 const pointNumber = ob.patp2dec(pointName);
54 const uhdw = await urbitWalletFromTicket(ticket, pointName, passphrase);
54 const uhdw = await urbitWalletFromTicket(ticket, pointName, passphrase);
55 const isOwner = azimuth.azimuth.isOwner(
55 const isOwner = azimuth.azimuth.isOwner(
56− realContracts,
56+ _contracts,
57 pointNumber,
57 pointNumber,
58 uhdw.ownership.keys.address
58 uhdw.ownership.keys.address
59 );
59 );
60 const isTransferProxy = azimuth.azimuth.isTransferProxy(
60 const isTransferProxy = azimuth.azimuth.isTransferProxy(
61− realContracts,
61+ _contracts,
62 pointNumber,
62 pointNumber,
63 uhdw.ownership.keys.address
63 uhdw.ownership.keys.address
64 );
64 );