Skip to content

Commit c9b45f6

Browse files
committed
fix price fetching bug
1 parent 9288c5c commit c9b45f6

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@allo-team/allo-v2-sdk": "^1.0.79",
2020
"@ethersproject/abstract-signer": "^5.7.0",
2121
"@ethersproject/providers": "^5.7.2",
22-
"@gitcoin/gitcoin-chain-data": "^1.0.40",
22+
"@gitcoin/gitcoin-chain-data": "^1.0.42",
2323
"@gitcoinco/passport-sdk-types": "^0.2.0",
2424
"@openzeppelin/merkle-tree": "^1.0.2",
2525
"@rainbow-me/rainbowkit": "2.1.2",

packages/grant-explorer/src/features/round/ViewCartPage/SummaryContainer.tsx

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,10 @@ export function SummaryContainer(props: {
404404
// $variant="solid"
405405
data-testid="handle-confirmation"
406406
type="button"
407-
disabled={totalDonationAcrossChainsInUSD === 0}
407+
disabled={
408+
// enabled, if at least one chain has enough balance to checkout
409+
!Object.values(props.enoughBalanceByChainId).some((value) => value)
410+
}
408411
onClick={() => {
409412
/* If wallet is not connected, display Rainbowkit modal */
410413
if (!isConnected) {
@@ -420,7 +423,13 @@ export function SummaryContainer(props: {
420423
</Button>
421424
<PayoutModals />
422425
<p className="mx-auto text-center mt-4 font-medium">
423-
Need to bridge funds ? Bridge funds <span className="underline cursor-pointer" onClick={() => props.handleSwap(42161)}>here!</span>
426+
Need to bridge funds ? Bridge funds{" "}
427+
<span
428+
className="underline cursor-pointer"
429+
onClick={() => props.handleSwap(42161)}
430+
>
431+
here!
432+
</span>
424433
</p>
425434
</div>
426435
);

packages/grant-explorer/src/features/round/ViewCartPage/ViewCartPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export default function ViewCart() {
190190
const balance =
191191
balances[Number(chainId)][
192192
getVotingTokenForChain(Number(chainId)).address.toLowerCase()
193-
].formattedAmount;
193+
]?.formattedAmount || 0;
194194
acc[Number(chainId)] = balance >= totalAmount;
195195
return acc;
196196
},

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)