Skip to content

Commit

Permalink
subaccount created instead of top level account
Browse files Browse the repository at this point in the history
  • Loading branch information
volovyks committed Jun 16, 2022
1 parent 07d47fd commit 9d2673d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion __tests__/02.patch-state.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (getNetworkFromEnv() === 'sandbox') {
const worker = await Worker.init();
const root = worker.rootAccount;
const contract = await root.createAndDeploy(
'status-message',
root.getSubAccount('status-message').accountId,
'__tests__/build/debug/status_message.wasm',
);
const ali = await root.createSubAccount('ali');
Expand Down
17 changes: 10 additions & 7 deletions __tests__/05.spoon-contract-to-sandbox.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ test('integrate own FT with Ref.Finance', async t => {
const root = t.context.worker.rootAccount;

const [ft, refFinance, wNEAR] = await Promise.all([
root.createAndDeploy('ft', '__tests__/build/debug/fungible_token.wasm', {
method: 'new_default_meta',
args: {
owner_id: root,
total_supply: NEAR.parse('1,000,000,000 N'),
},
}),
root.createAndDeploy(
root.getSubAccount('ft').accountId,
'__tests__/build/debug/fungible_token.wasm',
{
method: 'new_default_meta',
args: {
owner_id: root,
total_supply: NEAR.parse('1,000,000,000 N'),
},
}),
createRef(root),
createWNEAR(root),
]);
Expand Down
2 changes: 1 addition & 1 deletion packages/js/__tests__/record-builder.ava.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if (getNetworkFromEnv() === 'sandbox') {
const root = worker.rootAccount;

const contract = await root.createAndDeploy(
'status-message',
root.getSubAccount('status-message').accountId,
path.join(__dirname, '..', '..', '..', '__tests__', 'build', 'debug', 'status_message.wasm'),
);
const ali = await root.createSubAccount('ali');
Expand Down

0 comments on commit 9d2673d

Please sign in to comment.