on master help sign in
Use conventional names for non-maybe store values
commitfe527dab05599ebbbd3bc777f2366375f425ff6a authorFang <git@fang.io> dateTue 25 Jun 2019, 16:38 (7 years ago) parentff1b48b
3 files changed+11−11
src/views/Login.js+6−6 src/views/Login/Keystore.js+2−2 src/views/Login/Ticket.js+3−3
src/views/Login.js+6−6
@@ -44,22 +44,22 @@ export default function Login() {
4444 }, []);
4545
4646 const doContinue = async () => {
47− const realWallet = need.wallet(wallet);
48− const realContracts = need.contracts(contracts);
47+ const _wallet = need.wallet(wallet);
48+ const _contracts = need.contracts(contracts);
4949
5050 // if no point cursor set by login logic, try to deduce it
5151 let deduced = Nothing();
5252 if (Nothing.hasInstance(pointCursor)) {
5353 const owned = await azimuth.azimuth.getOwnedPoints(
54− realContracts,
55− realWallet.address
54+ _contracts,
55+ _wallet.address
5656 );
5757 if (owned.length === 1) {
5858 deduced = Just(owned[0]);
5959 } else if (owned.length === 0) {
6060 const canOwn = await azimuth.azimuth.getTransferringFor(
61− realContracts,
62− realWallet.address
61+ _contracts,
62+ _wallet.address
6363 );
6464 if (canOwn.length === 1) {
6565 deduced = Just(canOwn[0]);
src/views/Login/Keystore.js+2−2
@@ -30,9 +30,9 @@ export default function Keystore({ loginCompleted }) {
3030 const json = JSON.parse(text);
3131 const privateKey = keythereum.recover(password, json);
3232
33− const wallet = new EthereumWallet(privateKey);
33+ const newWallet = new EthereumWallet(privateKey);
3434 setDecryptionProblem(false);
35− setWallet(Just(wallet));
35+ setWallet(Just(newWallet));
3636 } catch (err) {
3737 setDecryptionProblem(true);
3838 setWallet(Nothing());
src/views/Login/Ticket.js+3−3
@@ -49,16 +49,16 @@ export default function Ticket({ advanced, loginCompleted }) {
4949 return;
5050 }
5151 setTicketStatus(Just(INPUT_STATUS.SPIN));
52− const realContracts = need.contracts(contracts);
52+ const _contracts = need.contracts(contracts);
5353 const pointNumber = ob.patp2dec(pointName);
5454 const uhdw = await urbitWalletFromTicket(ticket, pointName, passphrase);
5555 const isOwner = azimuth.azimuth.isOwner(
56− realContracts,
56+ _contracts,
5757 pointNumber,
5858 uhdw.ownership.keys.address
5959 );
6060 const isTransferProxy = azimuth.azimuth.isTransferProxy(
61− realContracts,
61+ _contracts,
6262 pointNumber,
6363 uhdw.ownership.keys.address
6464 );