Skip to content

Commit

Permalink
feat: accaddress
Browse files Browse the repository at this point in the history
  • Loading branch information
Senna46 committed Sep 12, 2023
1 parent 91fb845 commit 12c1095
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions gen-proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions src/rest/bank/bank-multisig.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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' }],
});

Expand Down
8 changes: 4 additions & 4 deletions src/rest/bank/bank.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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' }],
});

Expand Down
2 changes: 1 addition & 1 deletion src/rest/feegrant/module.ts
Original file line number Diff line number Diff line change
@@ -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());
}

Expand Down

0 comments on commit 12c1095

Please sign in to comment.