Skip to content

Commit

Permalink
feat: Upgrade cosmos type to 0.4.0 alpha 30
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 committed Dec 25, 2023
1 parent df0c57a commit 7559ea0
Show file tree
Hide file tree
Showing 8 changed files with 790 additions and 347 deletions.
5 changes: 0 additions & 5 deletions .changeset/rare-steaks-happen.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@bnb-chain/greenfield-js-sdk': patch
---

fix: Sp tag types
feat: Upgrade cosmos types to 0.4.0-alpha.30
2 changes: 1 addition & 1 deletion examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "next lint"
},
"dependencies": {
"@bnb-chain/greenfield-cosmos-types": "0.4.0-alpha.25",
"@bnb-chain/greenfield-cosmos-types": "0.4.0-alpha.30",
"@bnb-chain/greenfield-js-sdk": "workspace:*",
"@bnb-chain/reed-solomon": "workspace:*",
"@cosmjs/encoding": "^0.32.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
]
},
"dependencies": {
"@bnb-chain/greenfield-cosmos-types": "0.4.0-alpha.23",
"@bnb-chain/greenfield-cosmos-types": "0.4.0-alpha.30",
"@bnb-chain/greenfield-zk-crypto": "workspace:*",
"@cosmjs/proto-signing": "^0.32.0",
"@cosmjs/stargate": "^0.32.0",
Expand Down
11 changes: 7 additions & 4 deletions packages/js-sdk/src/api/crosschain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {
QuerySendSequenceRequest,
QuerySendSequenceResponse,
} from '@bnb-chain/greenfield-cosmos-types/cosmos/crosschain/v1/query';
import { QueryInturnRelayerResponse } from '@bnb-chain/greenfield-cosmos-types/cosmos/oracle/v1/query';
import {
QueryInturnRelayerRequest,
QueryInturnRelayerResponse,
} from '@bnb-chain/greenfield-cosmos-types/cosmos/oracle/v1/query';
import { MsgClaim } from '@bnb-chain/greenfield-cosmos-types/cosmos/oracle/v1/tx';
import { QueryParamsResponse } from '@bnb-chain/greenfield-cosmos-types/greenfield/bridge/query';
import { MsgTransferOut } from '@bnb-chain/greenfield-cosmos-types/greenfield/bridge/tx';
Expand Down Expand Up @@ -58,7 +61,7 @@ export interface ICrossChain {
/**
* gets the in-turn relayer bls public key and its relay interval
*/
getInturnRelayer(): Promise<QueryInturnRelayerResponse>;
getInturnRelayer(request: QueryInturnRelayerRequest): Promise<QueryInturnRelayerResponse>;

getCrosschainPackage(
request: QueryCrossChainPackageRequest,
Expand Down Expand Up @@ -117,9 +120,9 @@ export class CrossChain implements ICrossChain {
return await rpc.ReceiveSequence(request);
}

public async getInturnRelayer() {
public async getInturnRelayer(request: QueryInturnRelayerRequest) {
const rpc = await this.queryClient.getOracleQueryClient();
return await rpc.InturnRelayer();
return await rpc.InturnRelayer(request);
}

public async getCrosschainPackage(request: QueryCrossChainPackageRequest) {
Expand Down
1 change: 1 addition & 0 deletions packages/js-sdk/src/api/feegrant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export class FeeGrant implements IFeeGrant {
{
...MsgGrantAllowance.toSDK(grantAllowance),
allowance: {
// @ts-ignore
type: grantAllowance.allowance?.typeUrl,
value: base64FromBytes(arrayify('0x' + encodeToHex(JSON.stringify(marshal)))),
// TODO: @roshan next version should return hex string
Expand Down
2 changes: 1 addition & 1 deletion packages/js-sdk/src/api/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class Group implements IGroup {
members_to_add: msg.membersToAdd.map((x) => {
return {
member: x.member,
expiration_time: fromTimestamp(x.expirationTime),
expiration_time: x.expirationTime && fromTimestamp(x.expirationTime),
};
}),
},
Expand Down
Loading

0 comments on commit 7559ea0

Please sign in to comment.