Skip to content

Commit 7bdd6fc

Browse files
committed
chore: minor
1 parent 51be42e commit 7bdd6fc

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/sdk-ts/src/client/indexer/grpc/IndexerGrpcTransactionApi.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ export class IndexerGrpcTransactionApi {
9797
} catch (e: unknown) {
9898
if (e instanceof InjectiveExchangeRpc.GrpcWebError) {
9999
throw new TransactionException(new Error(e.toString()), {
100-
code: e.code,
101100
type: e.type,
101+
contextCode: e.code,
102102
context: 'Web3Gateway.PrepareTx',
103103
})
104104
}
@@ -175,8 +175,8 @@ export class IndexerGrpcTransactionApi {
175175
} catch (e: unknown) {
176176
if (e instanceof InjectiveExchangeRpc.GrpcWebError) {
177177
throw new TransactionException(new Error(e.toString()), {
178-
code: e.code,
179178
type: e.type,
179+
contextCode: e.code,
180180
context: 'Web3Gateway.CosmosPrepareTx',
181181
})
182182
}
@@ -244,8 +244,8 @@ export class IndexerGrpcTransactionApi {
244244
} catch (e: unknown) {
245245
if (e instanceof InjectiveExchangeRpc.GrpcWebError) {
246246
throw new TransactionException(new Error(e.toString()), {
247-
code: e.code,
248247
type: e.type,
248+
contextCode: e.code,
249249
context: 'Web3Gateway.BroadcastTx',
250250
})
251251
}

packages/sdk-ts/src/core/tx/broadcaster/MsgBroadcasterWithPk.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ export class MsgBroadcasterWithPk {
192192
.toNumber()
193193
}
194194

195-
const transactionApi = new IndexerGrpcWeb3GwApi(endpoints.indexer)
195+
const transactionApi = new IndexerGrpcWeb3GwApi(
196+
endpoints.web3gw || endpoints.indexer,
197+
)
196198
const txResponse = await transactionApi.prepareTxRequest({
197199
memo: tx.memo,
198200
message: web3Msgs,

0 commit comments

Comments
 (0)