diff --git a/src/libs/client.ts b/src/libs/client.ts index b4eb5391..e9ae6249 100644 --- a/src/libs/client.ts +++ b/src/libs/client.ts @@ -17,11 +17,9 @@ import semver from 'semver'; export class BaseRestClient { version: string; endpoint: string; - rpcEndpoint: string; registry: R; - constructor(endpoint: string, registry: R, version?: string, rpcEndpoint?: string) { + constructor(endpoint: string, registry: R, version?: string) { this.endpoint = endpoint; - this.rpcEndpoint = rpcEndpoint || ''; this.registry = registry; this.version = version || 'v0.40'; } @@ -72,8 +70,7 @@ export class CosmosRestClient extends BaseRestClient { profile = findApiProfileBySDKVersion(ver); } } - const rpcEndpoint = chain?.endpoints?.rpc?.[0]?.address; - return new CosmosRestClient(endpoint, profile || DEFAULT, ver, rpcEndpoint); + return new CosmosRestClient(endpoint, profile || DEFAULT, ver); } // Auth Module @@ -315,12 +312,6 @@ export class CosmosRestClient extends BaseRestClient { async getTx(hash: string) { return this.request(this.registry.tx_hash, { hash }); } - async getTxFromRPC(hash: string) { - return this.request( - { url: `${this.rpcEndpoint}/tx?hash=0x{hash}`, adapter: async (source: any) => source }, - { hash } - ); - } // mint async getMintParam() { diff --git a/src/modules/[chain]/tx/[hash].vue b/src/modules/[chain]/tx/[hash].vue index 07553e56..799ce216 100644 --- a/src/modules/[chain]/tx/[hash].vue +++ b/src/modules/[chain]/tx/[hash].vue @@ -1,11 +1,12 @@