Skip to content

Commit

Permalink
🐛 Fixed null poolTokenAddress issue
Browse files Browse the repository at this point in the history
- Updated the code to handle cases where `poolTokenAddress` is null or undefined.
- Now, if `poolTokenAddress` is not available, it will default to `zeroAddress`. This prevents potential crashes and ensures smoother operation.
  • Loading branch information
Corantin committed Oct 10, 2024
1 parent 62ba2c4 commit 272d611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/web/components/Forms/PoolForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ export function PoolForm({ token, communityAddr }: Props) {

writeCreatePool({
args: [
previewData.poolTokenAddress as Address,
(previewData.poolTokenAddress || zeroAddress) as Address,
{
cvParams: {
decay: decay,
Expand Down

0 comments on commit 272d611

Please sign in to comment.