diff --git a/landing/src/components/ui/SelectResources.tsx b/landing/src/components/ui/SelectResources.tsx index 2973afe54..eeb2a0d93 100644 --- a/landing/src/components/ui/SelectResources.tsx +++ b/landing/src/components/ui/SelectResources.tsx @@ -21,7 +21,7 @@ export const SelectResources = ({ setSelectedResourceAmounts: any; entity_id: ID; }) => { - const { getBalance } = useResourceBalance({entityId: entity_id}); + const { getBalance } = useResourceBalance({ entityId: entity_id }); const unselectedResources = useMemo( () => resources.filter((res) => !selectedResourceIds.includes(res.id)), @@ -32,7 +32,7 @@ export const SelectResources = ({ setSelectedResourceIds([...selectedResourceIds, unselectedResources[0].id]); setSelectedResourceAmounts({ ...selectedResourceAmounts, - [unselectedResources[0].id]: 1, + [unselectedResources[0].id]: divideByPrecision(getBalance(unselectedResources[0].id) || 0), }); }; @@ -40,12 +40,12 @@ export const SelectResources = ({