@@ -12,7 +12,6 @@ import {
12 addHexPrefix
12 addHexPrefix
13 } from '../lib/wallet'
13 } from '../lib/wallet'
16const TXN_PURPOSE = {
15const TXN_PURPOSE = {
17 SET_MANAGEMENT_PROXY: Symbol('SET_MANAGEMENT_PROXY'),
16 SET_MANAGEMENT_PROXY: Symbol('SET_MANAGEMENT_PROXY'),
18 SET_TRANSFER_PROXY: Symbol('SET_TRANSFER_PROXY'),
17 SET_TRANSFER_PROXY: Symbol('SET_TRANSFER_PROXY'),
@@ -43,35 +42,6 @@ const renderTxnPurpose = (purpose) =>
43 ? 'cancel this transfer'
42 ? 'cancel this transfer'
44 : 'perform this transaction'
43 : 'perform this transaction'
50−// const createUnsignedTxn = config => {
58−// const ctrcs = contracts.matchWith({
59−// Just: (cs) => cs.value,
61−// throw BRIDGE_ERROR.MISSING_CONTRACTS
65−// const galaxy = parseInt(ob.patp2dec(galaxyName), 10)
67−// const txn = isValidGalaxy(galaxyName) && isValidAddress(galaxyOwner)
68−// ? Maybe.Just(azimuth.ecliptic.createGalaxy(ctrcs, galaxy, galaxyOwner))
75const signTransaction = async config => {
45const signTransaction = async config => {
@@ -93,9 +63,7 @@ const signTransaction = async config => {
94 const wal = wallet.matchWith({
64 const wal = wallet.matchWith({
95 Just: (w) => w.value,
65 Just: (w) => w.value,
97− throw BRIDGE_ERROR.MISSING_WALLET
66+ Nothing: () => { throw BRIDGE_ERROR.MISSING_WALLET }
101 const sec = wal.privateKey
69 const sec = wal.privateKey
@@ -121,8 +89,6 @@ const signTransaction = async config => {
121 setStx(Maybe.Just(stx))
89 setStx(Maybe.Just(stx))
126const sendSignedTransaction = (web3, stx) => {
92const sendSignedTransaction = (web3, stx) => {
127 const txn = stx.matchWith({
93 const txn = stx.matchWith({
128 Just: (tx) => tx.value,
94 Just: (tx) => tx.value,
@@ -170,28 +136,6 @@ const toHex = dummy.utils.toHex
170const toWei = dummy.utils.toWei
136const toWei = dummy.utils.toWei
171const fromWei = dummy.utils.fromWei
137const fromWei = dummy.utils.fromWei
174−// const confirmShipAvailability = (point, contracts) => {
176−// if (canDecodePatp(point) === true) {
178−// const pointDec = ob.patp2dec(point)
180−// contracts.matchWith({
182−// throw BRIDGE_ERROR.MISSING_CONTRACTS
184−// Just: async (contracts) => {
185−// const owner = await azimuth.azimuth.getOwner(contracts.value, point)
186−// if (eqAddr(owner, ETH_ZERO_ADDR)) return true
195const canDecodePatp = p => {
139const canDecodePatp = p => {
197 ob.patp2dec(p)
141 ob.patp2dec(p)
@@ -201,21 +145,6 @@ const canDecodePatp = p => {
208−// const bridgeAPI = {
209−// shipAvailability: {
210−// planet: planet => {},
212−// galaxy: galaxy => {},
220 signTransaction,
149 signTransaction,
221 sendSignedTransaction,
150 sendSignedTransaction,
@@ -228,5 +157,4 @@ export {
230 canDecodePatp,
159 canDecodePatp,
231− // confirmShipAvailability,