Skip to content

Commit

Permalink
allowance to soul factory
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 9, 2022
1 parent 657eab8 commit 36081cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/SoulFactory.test.ts
Expand Up @@ -319,18 +319,24 @@ describe("Soul Factory", () => {
});

it("we can purchase an identity with stable coin", async () => {
// TODO: allowance to soul factory
const [priceInStableCoin, ,] = await soulFactory.purchaseIdentityInfo();

// set allowance for soul factory
const usdc: ERC20 = ERC20__factory.connect(USDC_RINKEBY, owner);
await usdc.connect(address1).approve(soulFactory.address, priceInStableCoin);

await soulFactory.connect(address1).purchaseIdentity(
USDC_RINKEBY // USDC
);
});

/*
it("we can purchase an identity with utility coin", async () => {
// TODO: allowance to soul factory
await soulFactory.connect(address1).purchaseIdentity(
CORN_RINKEBY // $CORN
);
});
}); */

it("we can't purchase an identity with ETH if we pay less", async () => {
const [, priceInETH] = await soulFactory.purchaseIdentityInfo();
Expand Down

0 comments on commit 36081cf

Please sign in to comment.