diff --git a/gen-proto.sh b/gen-proto.sh index 5ef46c2..d578f4c 100755 --- a/gen-proto.sh +++ b/gen-proto.sh @@ -39,7 +39,7 @@ npx pbts \ -o ./src/proto.d.ts \ ./src/proto.js -echo Edit proto.d.ts to resolve the conflict of `tendermint` namespace. -echo Require to rename `cometbft` proto +echo Edit proto.d.ts to resolve the conflict of tendermint namespace. +echo Require to rename cometbft proto rm -r ./proto diff --git a/src/rest/bank/bank-multisig.spec.ts b/src/rest/bank/bank-multisig.spec.ts index aa67572..a3d0acf 100644 --- a/src/rest/bank/bank-multisig.spec.ts +++ b/src/rest/bank/bank-multisig.spec.ts @@ -29,8 +29,8 @@ describe('bank', () => { }); const address = cosmosclient.AccAddress.fromPublicKey(multisigPubKey); - const fromAddress = address; - const toAddress = address; + const fromAddress = address.toString(); + const toAddress = address.toString(); // get account info const account = await cosmosclient.rest.auth @@ -45,8 +45,8 @@ describe('bank', () => { // build tx const msgSend = new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ - from_address: fromAddress.toString(), - to_address: toAddress.toString(), + from_address: fromAddress, + to_address: toAddress, amount: [{ denom: 'token', amount: '1' }], }); diff --git a/src/rest/bank/bank.spec.ts b/src/rest/bank/bank.spec.ts index a3de46e..5597299 100644 --- a/src/rest/bank/bank.spec.ts +++ b/src/rest/bank/bank.spec.ts @@ -15,8 +15,8 @@ describe('bank', () => { expect(address.toString()).toBe('cosmos14ynfqqa6j5k3kcqm2ymf3l66d9x07ysxgnvdyx'); - const fromAddress = address; - const toAddress = address; + const fromAddress = address.toString(); + const toAddress = address.toString(); // get account info const account = await cosmosclient.rest.auth @@ -31,8 +31,8 @@ describe('bank', () => { // build tx const msgSend = new cosmosclient.proto.cosmos.bank.v1beta1.MsgSend({ - from_address: fromAddress.toString(), - to_address: toAddress.toString(), + from_address: fromAddress, + to_address: toAddress, amount: [{ denom: 'token', amount: '1' }], }); diff --git a/src/rest/feegrant/module.ts b/src/rest/feegrant/module.ts index 43e3fcb..db2fd7f 100644 --- a/src/rest/feegrant/module.ts +++ b/src/rest/feegrant/module.ts @@ -1,7 +1,7 @@ import { QueryApi } from '../../openapi/api'; import { CosmosSDK } from '../../sdk'; -export function allowance(sdk: CosmosSDK, granter: AccAddress, grantee: AccAddress) { +export function allowance(sdk: CosmosSDK, granter: string, grantee: string) { return new QueryApi(undefined, sdk.url).allowance(granter.toString(), grantee.toString()); }