Skip to content

Commit 8f0580f

Browse files
fix: returning correct ledger id for localnode (#163)
Signed-off-by: Mariusz Jasuwienas <mariusz.jasuwienas@arianelabs.com>
1 parent 05905ed commit 8f0580f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

test/getHtsStorageAt.test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ describe('::getHtsStorageAt', function () {
4242

4343
/** @type {IMirrorNodeClient} */
4444
const mirrorNodeClientStub = {
45+
getLedgerId() {
46+
return '0x00'; // Keep it mocked with default value.
47+
},
4548
async getTokenById(_tokenId) {
4649
throw Error('Not implemented');
4750
},

test/scripts/json-rpc-mock.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ const mirrorNodeClient = {
9494
append(method, ...args) {
9595
this.requests.push(`${method}:${args.join(',')}`);
9696
},
97+
getLedgerId() {
98+
return '0x00';
99+
},
97100
async getTokenById(tokenId) {
98101
this.append('getTokenById', tokenId);
99102
if (tokens[tokenId] === undefined) return null;

test/slotMapOf.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('::slotmap', function () {
3131
['MFCT', 'USDC'].forEach(symbol => {
3232
describe(symbol, function () {
3333
it(`should have valid slot fields`, async function () {
34-
const map = slotMapOf(require(`../test/data/${symbol}/getToken.json`));
34+
const map = slotMapOf(require(`../test/data/${symbol}/getToken.json`), '0x00');
3535

3636
[...map._map.entries()].forEach(([slot, values]) => {
3737
expect(slot).to.be.not.undefined;

0 commit comments

Comments
 (0)