Skip to content

Commit

Permalink
pr and build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bryzettler committed Sep 13, 2023
1 parent 60dd34d commit f3ed522
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 67 deletions.
6 changes: 3 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -861,17 +861,17 @@ SPEC CHECKSUMS:
FBLazyVector: f1897022b53abf1469d6ad692ee2c69f57d967f3
FBReactNativeSpec: 627fd07f1b9d498c9fa572e76d7f1a6b1ee9a444
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 791fe035093b84822da7f0870421a25839ca7870
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
helium-react-native-sdk: 32c0a7e3abc733a7f3d291013b2db31475fc6980
hermes-engine: 7a53ccac09146018a08239c5425625fdb79a6162
hermes-engine: 0784cadad14b011580615c496f77e0ae112eed75
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MapboxCommon: fdf7fd31c90b7b607cd9c63e37797f023c01d860
MapboxCoreMaps: 24270c7c6b8cb71819fc2f3c549db9620ee4d019
MapboxMaps: cb76511b98d3b95c74b0771ed105bc69f30ace6b
MapboxMobileEvents: de50b3a4de180dd129c326e09cd12c8adaaa46d6
MultiplatformBleAdapter: 5a6a897b006764392f9cef785e4360f54fb9477d
OneSignalXCFramework: 81ceac017a290f23793443323090cfbe888f74ea
RCT-Folly: 85766c3226c7ec638f05ad7cb3cf6a268d6c4241
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
RCTRequired: bd6045fbd511da5efe6db89eecb21e4e36bd7cbf
RCTTypeSafety: c06d9f906faa69dd1c88223204c3a24767725fd8
React: b9ea33557ef1372af247f95d110fbdea114ed3b2
Expand Down
57 changes: 0 additions & 57 deletions patches/@noble+curves+1.0.0.patch

This file was deleted.

17 changes: 10 additions & 7 deletions src/features/swaps/SwapScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,19 @@ const SwapScreen = () => {
[visibleTokens, routeMap],
)

const validOutputMints = useMemo(
() =>
const validOutputMints = useMemo(() => {
const routeMints =
routeMap
.get(inputMint?.toBase58() || '')
?.filter(
(key) =>
visibleTokens.has(key) && !inputMint.equals(new PublicKey(key)),
) || [],
[visibleTokens, routeMap, inputMint],
)
) || []

return inputMint.equals(HNT_MINT)
? [DC_MINT.toBase58(), ...routeMints]
: routeMints
}, [visibleTokens, routeMap, inputMint])

const handleRecipientClick = useCallback(() => {
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
Expand Down Expand Up @@ -161,7 +164,7 @@ const SwapScreen = () => {

return (
!inputMint.equals(HNT_MINT) &&
!(routes?.outAmount && Number(routes?.outAmount) > 0) &&
!(routes?.outAmount && new BN(routes?.outAmount || 0).gt(new BN(0))) &&
inputAmount > 0
)
}, [hntBalance, inputAmount, inputMint, routes])
Expand Down Expand Up @@ -254,7 +257,7 @@ const SwapScreen = () => {
!outputMint.equals(DC_MINT)
) {
await getRoute({
amount: toBN(inputAmount, inputMintDecimals).toNumber(),
amount: toBN(inputAmount || 0, inputMintDecimals).toNumber(),
inputMint: inputMint.toBase58(),
outputMint: outputMint.toBase58(),
slippageBps,
Expand Down

0 comments on commit f3ed522

Please sign in to comment.