Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(swap): infinite open orders loading #2758

Merged
merged 2 commits into from
Oct 12, 2023
Merged

Conversation

banklesss
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the fix label Oct 12, 2023
@banklesss banklesss requested review from jorbuedo and SorinC6 October 12, 2023 06:52
@banklesss banklesss self-assigned this Oct 12, 2023
Comment on lines +204 to +220
const getFee = React.useCallback(
async (utxo: string, collateralUtxo: string, bech32Address: string) => {
let fee = '0'
setIsLoading(true)

try {
fee = await getCancellationOrderFee(wallet, cancelOrder, {orderUtxo: utxo, collateralUtxo, bech32Address})
} catch (error) {
Alert.alert(strings.generalErrorTitle, strings.generalErrorMessage(error))
}

setIsLoading(false)
return fee
},
[cancelOrder, strings, wallet],
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we turn it into a react-query and manually refetch on click (enable: false)? also disable cache.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

build fee as an Amount with PT.

@stackchain stackchain merged commit 05433c9 into develop Oct 12, 2023
@stackchain stackchain deleted the fix/loading-open-orders branch October 12, 2023 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants