Skip to content

Commit 31f8426

Browse files
authored
Merge pull request #318 from docknetwork/fix/issues-with-blockchain-rpc-service
Fix/issues with blockchain rpc service
2 parents b75b6b7 + b383d25 commit 31f8426

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

packages/wasm/src/services/blockchain/service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class BlockchainService {
5454
];
5555

5656
constructor() {
57-
this.name = 'dock';
57+
this.name = 'blockchain';
5858
this.dock = new DockAPI();
5959
this.cheqdApi = new CheqdAPI();
6060
this.didModule = new DockDIDModule(this.dock);

packages/wasm/src/services/example/service.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import {SumParams, validation} from './configs';
44
export class ExampleService {
55
rpcMethods = [ExampleService.prototype.sum];
66

7-
constructor() {}
7+
constructor() {
8+
this.name = 'example';
9+
}
810

911
sum(params: SumParams) {
1012
validation.sum(params);

packages/wasm/src/services/test-utils.js

+2
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,8 @@ export function assertRpcService(
255255
const rpcService = new ServiceClass();
256256
const validationTmp = {};
257257

258+
assert(rpcService.serviceName === service.name, 'service name mismatch');
259+
258260
Object.keys(validation).forEach(key => {
259261
validationTmp[key] = validation[key];
260262
validation[key] = () => true;

0 commit comments

Comments
 (0)