on master help sign in
Don't use a Maybe for sendSignedTransaction
d6d11dfFang
src/components/old/StatelessTransaction.js+1−6
@@ -233,12 +233,7 @@ class StatelessTransaction extends React.Component {
233 } else {
233 } else {
234 this.setState({ txStatus: SUBMISSION_STATES.SENDING });
234 this.setState({ txStatus: SUBMISSION_STATES.SENDING });
235
235
236− sendSignedTransaction(
237− web3,
238− state.stx,
239− usedTank,
240− props.setTxnConfirmations
236+ sendSignedTransaction(web3, stx, usedTank, props.setTxnConfirmations)
241− )
242 .then(txHash => {
237 .then(txHash => {
243 props.setTxnCursor(Just(Ok(txHash)));
238 props.setTxnCursor(Just(Ok(txHash)));
244
239
src/lib/invite.js+1−1
@@ -258,7 +258,7 @@ async function claimPointFromInvite({
258
258
259 progress(TRANSACTION_STATES.CLAIMING);
259 progress(TRANSACTION_STATES.CLAIMING);
260
260
261− await sendAndAwaitAll(web3, txPairs.map(p => Just(p.signed)), usedTank);
261+ await sendAndAwaitAll(web3, txPairs.map(p => p.signed), usedTank);
262
262
263 //
263 //
264 // move leftover eth
264 // move leftover eth
src/lib/txn.js+1−8
@@ -145,14 +145,7 @@ const signTransaction = async config => {
145};
145};
146
146
147const sendSignedTransaction = (web3, stx, doubtNonceError) => {
147const sendSignedTransaction = (web3, stx, doubtNonceError) => {
148− const txn = stx.matchWith({
149− Just: tx => tx.value,
150− Nothing: () => {
151− throw BRIDGE_ERROR.MISSING_TXN;
152− },
153− });
154−
155− const rawTx = hexify(txn.serialize());
148+ const rawTx = hexify(stx.serialize());
156
149
157 return new Promise(async (resolve, reject) => {
150 return new Promise(async (resolve, reject) => {
158 web3.eth
151 web3.eth
src/views/Invite/InviteEmail.js+1−1
@@ -320,7 +320,7 @@ export default function InviteEmail() {
320 try {
320 try {
321 const txHash = await sendSignedTransaction(
321 const txHash = await sendSignedTransaction(
322 _web3,
322 _web3,
323− Just(invite.signedTx),
323+ invite.signedTx,
324 tankWasUsed,
324 tankWasUsed,
325 () => {}
325 () => {}
326 );
326 );