Skip to content

Commit

Permalink
fix price fetching bug (#3706)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKurt authored Oct 24, 2024
1 parent 9288c5c commit 912c7fd
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@allo-team/allo-v2-sdk": "^1.0.79",
"@ethersproject/abstract-signer": "^5.7.0",
"@ethersproject/providers": "^5.7.2",
"@gitcoin/gitcoin-chain-data": "^1.0.40",
"@gitcoin/gitcoin-chain-data": "^1.0.42",
"@gitcoinco/passport-sdk-types": "^0.2.0",
"@openzeppelin/merkle-tree": "^1.0.2",
"@rainbow-me/rainbowkit": "2.1.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,10 @@ export function SummaryContainer(props: {
// $variant="solid"
data-testid="handle-confirmation"
type="button"
disabled={totalDonationAcrossChainsInUSD === 0}
disabled={
// enabled, if at least one chain has enough balance to checkout
!Object.values(props.enoughBalanceByChainId).some((value) => value)
}
onClick={() => {
/* If wallet is not connected, display Rainbowkit modal */
if (!isConnected) {
Expand All @@ -420,7 +423,13 @@ export function SummaryContainer(props: {
</Button>
<PayoutModals />
<p className="mx-auto text-center mt-4 font-medium">
Need to bridge funds ? Bridge funds <span className="underline cursor-pointer" onClick={() => props.handleSwap(42161)}>here!</span>
Need to bridge funds ? Bridge funds{" "}
<span
className="underline cursor-pointer"
onClick={() => props.handleSwap(42161)}
>
here!
</span>
</p>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default function ViewCart() {
const balance =
balances[Number(chainId)][
getVotingTokenForChain(Number(chainId)).address.toLowerCase()
].formattedAmount;
]?.formattedAmount || 0;
acc[Number(chainId)] = balance >= totalAmount;
return acc;
},
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 912c7fd

Please sign in to comment.