Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
shunjizhan committed Jan 22, 2024
1 parent 1fdb1d5 commit 08d3174
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/eth-rpc-adapter/src/wrapped-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApiPromise, WsProvider } from '@polkadot/api';
import { BaseProvider, BaseProviderOptions } from '@acala-network/eth-providers/base-provider';
import { options } from '@acala-network/api';
import { acalaRuntime, acalaTypesBundle } from '@acala-network/types';
import tracer from 'dd-trace';

const TRACE_METHODS = [
Expand Down Expand Up @@ -85,8 +85,11 @@ export class EvmRpcProviderWithTrace extends BaseProviderWithTrace {
constructor(endpoint: string | string[], opts?: BaseProviderOptions) {
super(opts);

const provider = new WsProvider(endpoint);
const api = new ApiPromise(options({ provider }));
const api = new ApiPromise({
provider: new WsProvider(endpoint),
runtime: acalaRuntime,
typesBundle: acalaTypesBundle,
});

this.setApi(api);
}
Expand Down

0 comments on commit 08d3174

Please sign in to comment.