Skip to content

Commit

Permalink
Fix an issue with createAccountWithDisabledDeposits
Browse files Browse the repository at this point in the history
  • Loading branch information
0xOmarA committed Sep 18, 2023
1 parent 00f67c8 commit df892fc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@radixdlt/radix-engine-toolkit",
"version": "0.4.3",
"version": "0.4.4",
"description": "A TypeScript wrapper for the Radix Engine Toolkit that provides many of the necessary tools to interact with the Radix ledger",
"types": "./dist/index.d.ts",
"main": "./dist/radix-engine-toolkit.umd.js",
Expand Down
2 changes: 1 addition & 1 deletion src/lts/toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ export abstract class LTSRadixEngineToolkit {

const manifest = new ManifestBuilder()
.callMethod(faucetComponentAddress, "lock_fee", [decimal("10")])
.callMethod(virtualAccount, "change_account_default_deposit_rule", [
.callMethod(virtualAccount, "set_default_deposit_rule", [
enumeration(1),
])
.build();
Expand Down
18 changes: 13 additions & 5 deletions tests/lts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,21 @@ describe("Address Class", () => {
it("LTS TestUtils creation of disabled deposit account works.", async () => {
const { accountAddress, compiledNotarizedTransaction } =
await LTSRadixEngineToolkit.TestUtils.createAccountWithDisabledDeposits(
5702,
0x0d
3173,
14
);

compiledNotarizedTransaction
.staticallyValidate(0x0d)
.then((x) => x.throwIfInvalid());
const instructions =
await RadixEngineToolkit.NotarizedTransaction.decompile(
compiledNotarizedTransaction.compiled
).then((tx) => tx.signedIntent.intent.manifest.instructions);

const validity = await RadixEngineToolkit.Instructions.staticallyValidate(
instructions,
14
);

expect(validity.kind).toEqual("Valid");
});

it("Compiled untyped intent can be summarized by the LTS toolkit", async () => {
Expand Down

0 comments on commit df892fc

Please sign in to comment.