on master help sign in
Properly unwrap transaction object
f608c65Fang
src/bridge/components/StatelessTransaction.js+7−1
@@ -185,7 +185,13 @@ class StatelessTransaction extends React.Component {
185
185
186 this.setState({ txStatus: SUBMISSION_STATES.FUNDING });
186 this.setState({ txStatus: SUBMISSION_STATES.FUNDING });
187
187
188− const rawTx = hexify(state.stx.value.serialize());
188+ const stx = state.stx.matchWith({
189+ Just: tx => tx.value,
190+ Nothing: () => {
191+ throw BRIDGE_ERROR.MISSING_TXN;
192+ }
193+ });
194+ const rawTx = hexify(stx.serialize());
189 const cost = (state.gasLimit * toWei(state.gasPrice, 'gwei'));
195 const cost = (state.gasLimit * toWei(state.gasPrice, 'gwei'));
190
196
191 //TODO need a lib function or something for address=, it's everywhere
197 //TODO need a lib function or something for address=, it's everywhere