Hey is a decentralized and permissionless social media app built with Lens Protocol 🌿

feat: add Max button to Transfer component for setting amount to token balance

yoginth.com 74eaed28 2a6ff9b1

verified
+9
+9
apps/web/src/components/Shared/Account/TopUp/Transfer.tsx
··· 100 100 ? Number(balance.balancesBulk[0].value).toFixed(2) 101 101 : 0; 102 102 103 + const numericTokenBalance = Number(tokenBalance) || 0; 104 + 103 105 const onOtherAmount = (event: ChangeEvent<HTMLInputElement>) => { 104 106 const value = Number(event.target.value); 105 107 setAmount(value); ··· 165 167 outline={amount !== 5} 166 168 > 167 169 5 170 + </Button> 171 + <Button 172 + className="w-full" 173 + onClick={() => handleSetAmount(numericTokenBalance)} 174 + outline={amount !== numericTokenBalance} 175 + > 176 + Max 168 177 </Button> 169 178 <Button 170 179 className="w-full"