on master help sign in
Properly unwrap transaction object
commitf608c65e7dbb4b89a9aa573c744a3e19e7447767 authorFang <git@fang.io> dateWed 8 May 2019, 16:05 (7 years ago) parent062cc51
1 file changed+7−1
src/bridge/components/StatelessTransaction.js+7−1
src/bridge/components/StatelessTransaction.js+7−1
@@ -185,7 +185,13 @@ class StatelessTransaction extends React.Component {
185185
186186 this.setState({ txStatus: SUBMISSION_STATES.FUNDING });
187187
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());
189195 const cost = (state.gasLimit * toWei(state.gasPrice, 'gwei'));
190196
191197 //TODO need a lib function or something for address=, it's everywhere