on master help sign in
bitcoin: remove references to a point
c8e8454pkova
src/views/Bitcoin.js+3−8
@@ -1,7 +1,6 @@
1import React, { useState } from 'react';
1import React, { useState } from 'react';
2import { Grid, Text } from 'indigo-react';
2import { Grid, Text } from 'indigo-react';
3import { useWallet } from 'store/wallet';
3import { useWallet } from 'store/wallet';
4−import { usePointCursor } from 'store/pointCursor';
5
4
6import { useLocalRouter } from 'lib/LocalRouter';
5import { useLocalRouter } from 'lib/LocalRouter';
7
6
@@ -18,7 +17,6 @@ import BridgeForm from 'form/BridgeForm';
18import * as need from 'lib/need';
17import * as need from 'lib/need';
19import * as bitcoin from 'bitcoinjs-lib';
18import * as bitcoin from 'bitcoinjs-lib';
20import * as bs58check from 'bs58check';
19import * as bs58check from 'bs58check';
21−import ob from 'urbit-ob';
22import { Buffer } from 'buffer';
20import { Buffer } from 'buffer';
23import { composeValidator, buildPsbtValidator } from 'form/validators';
21import { composeValidator, buildPsbtValidator } from 'form/validators';
24
22
@@ -32,7 +30,6 @@ function xpubToZpub(xpub) {
32export default function Bitcoin() {
30export default function Bitcoin() {
33 const { pop } = useLocalRouter();
31 const { pop } = useLocalRouter();
34 const { urbitWallet } = useWallet();
32 const { urbitWallet } = useWallet();
35− const { pointCursor } = usePointCursor();
36
33
37
34
38 const empty = new bitcoin.Psbt();
35 const empty = new bitcoin.Psbt();
@@ -40,8 +37,6 @@ export default function Bitcoin() {
40 const [signedTx, setSignedTx] = useState('');
37 const [signedTx, setSignedTx] = useState('');
41 const [psbt, setPsbt] = useState(empty);
38 const [psbt, setPsbt] = useState(empty);
42
39
43− const pointName = ob.patp(need.point(pointCursor));
44−
45 const privKey = need.urbitWallet(urbitWallet).bitcoin.keys.private;
40 const privKey = need.urbitWallet(urbitWallet).bitcoin.keys.private;
46 const pubKey = need.urbitWallet(urbitWallet).bitcoin.keys.public;
41 const pubKey = need.urbitWallet(urbitWallet).bitcoin.keys.public;
47 const chain = need.urbitWallet(urbitWallet).bitcoin.keys.chain;
42 const chain = need.urbitWallet(urbitWallet).bitcoin.keys.chain;
@@ -104,9 +99,9 @@ export default function Bitcoin() {
104 money, since your private keys are exposed to the browser.
99 money, since your private keys are exposed to the browser.
105 </Grid.Item>
100 </Grid.Item>
106 <Grid.Item full className="mt4" as={Text}>
101 <Grid.Item full className="mt4" as={Text}>
107− Below is the bitcoin extended public key derived from your point
102+ Below is the bitcoin extended public key derived from your master
108− {' ' + pointName}. You can paste it to Landscape to generate an
103+ ticket. You can paste it to Landscape to generate an unsigned
109− unsigned transaction.
104+ transaction.
110 </Grid.Item>
105 </Grid.Item>
111 <Grid.Item full className="mt4" as={Text}>
106 <Grid.Item full className="mt4" as={Text}>
112 <Highlighted>
107 <Highlighted>