Skip to content

Commit

Permalink
fix: approving sDAI balance when withdrawing
Browse files Browse the repository at this point in the history
  • Loading branch information
Luigy-Lemon committed Oct 3, 2023
1 parent e243976 commit e3e99ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const Form: React.FC = () => {
address: ERC4626_VAULT_ADDRESS,
abi: erc20ABI,
functionName: "approve",
args: [VAULT_ROUTER_ADDRESS, amount],
args: [VAULT_ROUTER_ADDRESS, sharesBalance.value],
enabled: action.action === Actions.ApproveSDAI,
}).config,
);
Expand Down
8 changes: 4 additions & 4 deletions src/components/TokenSelector/TokenSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ export type TokenSelectorProps = {

// Default config
const TOKENS = [
{
name: "WXDAI",
image: wxdaiLogo,
},
{
name: "xDAI",
image: xdaiLogo,
},
{
name: "WXDAI",
image: wxdaiLogo,
}
];

export const TokenSelector: React.FC<TokenSelectorProps> = ({ tokens = TOKENS, onSelected }) => {
Expand Down

0 comments on commit e3e99ca

Please sign in to comment.