File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 22 import { lib } from " $lib" ;
33 import { requestRollup } from " $lib/utils" ;
44 import { sdk } from " @repo/contracts/sdk" ;
5+ import { TokenAmount } from " @repo/contracts/sdk/RollupService" ;
56 import { Ui } from " @repo/ui" ;
67 import { utils } from " @repo/utils" ;
78 import { assert } from " ts-essentials" ;
3839 secretKey ,
3940 fromNote: note ,
4041 to ,
41- amount: BigInt (amount .quotient .toString ()),
42+ amount: await TokenAmount .from ({
43+ token: amount .currency .address ,
44+ amount: BigInt (amount .quotient .toString ()),
45+ }),
4246 });
4347 await requestRollup ();
4448 }
Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ const contract = PoolERC20__factory.connect(
3838const coreSdk = sdk . createCoreSdk ( contract ) ;
3939const trees = new sdk . RemoteTreesService ( route ( "POST /api/trees" ) ) ;
4040const interfaceSdk = sdk . createInterfaceSdk ( coreSdk , trees , {
41- shield : import ( "@repo/contracts/noir/target/shield .json" ) ,
42- unshield : import ( "@repo/contracts/noir/target/unshield .json" ) ,
43- join : import ( "@repo/contracts/noir/target/join .json" ) ,
44- transfer : import ( "@repo/contracts/noir/target/transfer .json" ) ,
41+ shield : import ( "@repo/contracts/noir/target/erc20_shield .json" ) ,
42+ unshield : import ( "@repo/contracts/noir/target/erc20_unshield .json" ) ,
43+ join : import ( "@repo/contracts/noir/target/erc20_join .json" ) ,
44+ transfer : import ( "@repo/contracts/noir/target/erc20_transfer .json" ) ,
4545} ) ;
4646const reown = new ReownService ( contract ) ;
4747const evm = new EvmAccountService ( ) ;
Original file line number Diff line number Diff line change @@ -464,6 +464,7 @@ export class Erc20Note {
464464 }
465465}
466466
467+ // TODO: replace with uniswap's CurrencyAmount
467468export class TokenAmount {
468469 constructor (
469470 readonly token : string ,
You can’t perform that action at this time.
0 commit comments