Skip to content

Commit

Permalink
feat: update token declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Space-Bean committed Jul 25, 2024
1 parent ced5de3 commit 8f2250e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 43 deletions.
14 changes: 0 additions & 14 deletions projects/dex-ui/src/declarations.d.ts

This file was deleted.

14 changes: 14 additions & 0 deletions projects/sdk/src/classes/Token/Token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ import { BigNumber, ContractTransaction } from "ethers";
const STALK_DECIMALS = 10;
const SEED_DECIMALS = 6;

declare module "@beanstalk/sdk-core" {
interface Token {
isUnripe: boolean;
rewards?: { stalk: TokenValue; seeds: TokenValue | null };
getStalk(bdv?: TokenValue): TokenValue;
getSeeds(bdv?: TokenValue): TokenValue;
approveBeanstalk(amount: TokenValue | BigNumber): Promise<ContractTransaction>;
}

namespace Token {
let _source: string;
}
}

// Adding the static Token._source property
Object.defineProperty(CoreToken, "_source", {
value: "BeanstalkSDK",
Expand Down
15 changes: 0 additions & 15 deletions projects/sdk/src/sdk-core.d.ts

This file was deleted.

14 changes: 0 additions & 14 deletions projects/ui/src/declarations.d.ts

This file was deleted.

0 comments on commit 8f2250e

Please sign in to comment.