Skip to content

Commit da17fc5

Browse files
committed
feat(js-dash-sdk): fix tests after merge
1 parent c7e40cb commit da17fc5

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

packages/dapi/test/unit/externalApis/drive/fetchProofForStateTransitionFactory.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ describe('fetchProofForStateTransition', () => {
112112
create: documents,
113113
}, {
114114
[identityId.toString()]: {
115-
[contractId.toString()]: 1,
115+
[contractId.toString()]: '1',
116116
},
117117
});
118118

packages/js-dapi-client/test/unit/methods/platform/getIdentityKeys/getIdentityKeysFactory.spec.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,14 @@ describe('getIdentityKeysFactory', () => {
103103
options,
104104
);
105105
expect(result.getIdentityKeys()).to.deep.equal([keys[0]]);
106-
expect(result.getMetadata()).to.deep.equal(metadataFixture);
106+
expect(result.getMetadata().getHeight())
107+
.to.deep.equal(BigInt(metadataFixture.height));
108+
expect(result.getMetadata().getCoreChainLockedHeight())
109+
.to.deep.equal(metadataFixture.coreChainLockedHeight);
110+
expect(result.getMetadata().getTimeMs())
111+
.to.deep.equal(BigInt(metadataFixture.timeMs));
112+
expect(result.getMetadata().getProtocolVersion())
113+
.to.deep.equal(metadataFixture.protocolVersion);
107114
expect(result.getProof()).to.equal(undefined);
108115
});
109116

packages/js-dash-sdk/src/SDK/Client/Platform/NonceManager/NonceManager.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class NonceManager {
7373

7474
public async bumpIdentityNonce(identityId: Identifier): Promise<bigint> {
7575
const identityNonce = await this.getIdentityNonce(identityId);
76-
const nextIdentityNonce = identityNonce + 1n;
76+
const nextIdentityNonce = identityNonce + BigInt(1);
7777

7878
this.setIdentityNonce(identityId, nextIdentityNonce);
7979

@@ -157,7 +157,7 @@ class NonceManager {
157157
): Promise<bigint> {
158158
const identityContractNonce = await this.getIdentityContractNonce(identityId, contractId);
159159
// @ts-ignore
160-
const nextIdentityContractNonce = identityContractNonce + 1n;
160+
const nextIdentityContractNonce = identityContractNonce + BigInt(1);
161161
this.setIdentityContractNonce(identityId, contractId, nextIdentityContractNonce);
162162
return nextIdentityContractNonce;
163163
}

0 commit comments

Comments
 (0)