Skip to content

Commit

Permalink
fix(coinmarket): sell process
Browse files Browse the repository at this point in the history
  • Loading branch information
adderpositive committed Sep 27, 2024
1 parent d897a5d commit 31d7125
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ export const useCoinmarketSellForm = ({
trade: { ...quote, refundAddress: getUnusedAddressFromAccount(account).address },
returnUrl,
});
setCallInProgress(false);

if (response.trade) {
if (response.trade.error && response.trade.status !== 'LOGIN_REQUEST') {
console.log(`[doSellTrade] ${response.trade.error}`);
Expand All @@ -373,6 +373,7 @@ export const useCoinmarketSellForm = ({
error: response.trade.error,
}),
);
setCallInProgress(false);

return undefined;
}
Expand All @@ -387,8 +388,8 @@ export const useCoinmarketSellForm = ({
saveSelectedQuote(response.trade);
setSellStep('SEND_TRANSACTION');
}
// dispatch(submitRequestForm(response.tradeForm?.form));
submitRequestForm(response.tradeForm?.form);
dispatch(() => submitRequestForm(response.tradeForm?.form));
setCallInProgress(false);

return undefined;
}
Expand All @@ -403,6 +404,7 @@ export const useCoinmarketSellForm = ({
error: errorMessage,
}),
);
setCallInProgress(false);
};
const needToRegisterOrVerifyBankAccount = (quote: SellFiatTrade) => {
const provider =
Expand Down Expand Up @@ -676,6 +678,7 @@ export const useCoinmarketSellForm = ({
sellStep,
selectedQuote,
shouldSendInSats,
trade,
changeFeeLevel,
composeRequest,
setAmountLimits,
Expand Down

0 comments on commit 31d7125

Please sign in to comment.