Skip to content

Commit

Permalink
[PAY-2236] USDC Balance in mobile nav updates after purchase (#6842)
Browse files Browse the repository at this point in the history
  • Loading branch information
dharit-tan authored Dec 4, 2023
1 parent a9b35ad commit 81202f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ const RenderForm = ({
const [{ value: purchaseMethod }, , { setValue: setPurchaseMethod }] =
useField(PURCHASE_METHOD)

const { data: balance } = useUSDCBalance()
const { data: balance } = useUSDCBalance({ isPolling: true })
const { extraAmount } = usePurchaseSummaryValues({
price,
currentBalance: balance
Expand Down Expand Up @@ -354,7 +354,6 @@ const RenderForm = ({
<USDCManualTransfer
onClose={handleUSDCManualTransferClose}
amountInCents={totalPriceInCents}
onSuccess={submitForm}
/>
</View>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,17 @@ const useStyles = makeStyles(({ spacing, palette, typography }) => ({

export const USDCManualTransfer = ({
onClose,
amountInCents,
onSuccess
amountInCents
}: {
onClose: () => void
amountInCents?: number
onSuccess?: () => void
}) => {
const styles = useStyles()
const { neutral } = useThemeColors()
const { toast } = useToast()

const { onPress: onPressLearnMore } = useLink(USDCLearnMore)
const { data: balanceBN } = useUSDCBalance({
isPolling: true,
pollingInterval: 1000
})
const { data: balanceBN } = useUSDCBalance()

useCreateUserbankIfNeeded({
recordAnalytics: track,
Expand Down

0 comments on commit 81202f7

Please sign in to comment.