Skip to content

Commit

Permalink
[worker] fix getting nonce by using toHex instead of to u8a
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Apr 6, 2024
1 parent 1966fe9 commit efb5ff8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/worker-api/src/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ export const clientRequestTrustedGetter = (self: IEncointerWorker, request: stri

const s = self.createType('ShardIdentifier', bs58.decode(shard));
const r = self.createType(
'Request', { shard: s, cyphertext: g.toU8a() }
'Request', {
shard: s,
cyphertext: g.toHex()
}
);

return createJsonRpcRequest('state_executeGetter', [r.toHex()],1);
Expand Down
2 changes: 1 addition & 1 deletion packages/worker-api/src/worker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('worker', () => {
describe('getNonce', () => {
it('should return value', async () => {
const result = await worker.getNonce(alice, network.mrenclave);
console.log('getBalance', result);
console.log('getNonce', result);
expect(result).toBeDefined();
});
});
Expand Down

0 comments on commit efb5ff8

Please sign in to comment.