Skip to content

Commit

Permalink
Merge pull request #318 from terra-money/revert-316-fix/sign-mode
Browse files Browse the repository at this point in the history
Revert "Fix/sign mode"
  • Loading branch information
Vritra4 authored Jul 19, 2022
2 parents cfc7259 + 29b1f69 commit d15fda3
Show file tree
Hide file tree
Showing 19 changed files with 11 additions and 792 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
},
"dependencies": {
"@terra-money/legacy.proto": "npm:@terra-money/terra.proto@^0.1.7",
"@terra-money/terra.proto": "^2.1.0-beta.1",
"@terra-money/terra.proto": "~2.0.0",
"axios": "^0.26.1",
"bech32": "^2.0.0",
"bip32": "^2.0.6",
Expand Down
18 changes: 0 additions & 18 deletions src/client/lcd/api/FeeGrantAPI.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,4 @@ describe('FeeGrantAPI', () => {
).rejects.toThrow();
});
});

/* TODO: unblock after v2.1.0-beta.1 applied
it('allowancesByGranter', async () => {
const res = await feeGrant.allowancesByGranter(
'terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v'
);
expect(res.allowances[0]).toMatchObject({
granter: expect.any(String),
grantee: expect.any(String),
});
const allowanceData = res.allowances[0].allowance.toData();
expect(allowanceData['@type']).toMatch(/cosmos.feegrant.v1beta1/g);
expect(res.pagination).not.toBeUndefined();
});
*/
});
31 changes: 1 addition & 30 deletions src/client/lcd/api/FeeGrantAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Pagination, PaginationOptions } from '../APIRequester';
import { LCDClient } from '../LCDClient';

export class FeeGrantAPI extends BaseAPI {

constructor(public lcd: LCDClient) {
super(lcd.apiRequester);
}
Expand Down Expand Up @@ -53,34 +54,4 @@ export class FeeGrantAPI extends BaseAPI {
}>(`/cosmos/feegrant/v1beta1/allowance/${granter}/${grantee}`)
.then(d => Allowance.fromData(d.allowance.allowance));
}

public async allowancesByGranter(
granter: AccAddress,
params: Partial<PaginationOptions> = {}
): Promise<{
allowances: {
granter: AccAddress;
grantee: AccAddress;
allowance: Allowance;
}[];
pagination: Pagination;
}> {
return this.c
.get<{
allowances: {
granter: AccAddress;
grantee: AccAddress;
allowance: Allowance.Data;
}[];
pagination: Pagination;
}>(`/cosmos/feegrant/v1beta1/issued/${granter}`, params)
.then(d => ({
allowances: d.allowances.map(allowance => ({
granter: allowance.granter,
grantee: allowance.grantee,
allowance: Allowance.fromData(allowance.allowance),
})),
pagination: d.pagination,
}));
}
}
33 changes: 0 additions & 33 deletions src/core/Msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ import {
MsgUndelegate,
StakingMsg,
} from './staking/msgs';
import {
MsgCreatePeriodicVestingAccount,
MsgCreateVestingAccount,
MsgDonateAllVestingTokens,
VestingMsg,
} from './vesting/msgs';
import {
MsgStoreCode,
MsgMigrateCode,
Expand Down Expand Up @@ -97,7 +91,6 @@ export type Msg =
| OracleMsg
| SlashingMsg
| StakingMsg
| VestingMsg
| WasmMsg
| IbcTransferMsg
| IbcClientMsg
Expand All @@ -116,7 +109,6 @@ export namespace Msg {
| OracleMsg.Amino
| SlashingMsg.Amino
| StakingMsg.Amino
| VestingMsg.Amino
| WasmMsg.Amino
| IbcTransferMsg.Amino
| CrisisMsg.Amino;
Expand All @@ -131,7 +123,6 @@ export namespace Msg {
| OracleMsg.Data
| SlashingMsg.Data
| StakingMsg.Data
| VestingMsg.Data
| WasmMsg.Data
| IbcTransferMsg.Data
| IbcClientMsg.Data
Expand All @@ -149,7 +140,6 @@ export namespace Msg {
| OracleMsg.Proto
| SlashingMsg.Proto
| StakingMsg.Proto
| VestingMsg.Proto
| WasmMsg.Proto
| IbcTransferMsg.Proto
| IbcClientMsg.Proto
Expand Down Expand Up @@ -248,13 +238,6 @@ export namespace Msg {
case 'cosmos-sdk/MsgEditValidator':
return MsgEditValidator.fromAmino(data, isClassic);

case 'cosmos-sdk/MsgCreatePeriodicVestingAccount':
return MsgCreatePeriodicVestingAccount.fromAmino(data, isClassic);
case 'cosmos-sdk/MsgCreateVestingAccount':
return MsgCreateVestingAccount.fromAmino(data, isClassic);
case 'cosmos-sdk/MsgDonateAllVestingTokens':
return MsgDonateAllVestingTokens.fromAmino(data, isClassic);

// wasm
case 'wasm/MsgStoreCode':
return MsgStoreCode.fromAmino(data, isClassic);
Expand Down Expand Up @@ -352,14 +335,6 @@ export namespace Msg {
case '/cosmos.staking.v1beta1.MsgEditValidator':
return MsgEditValidator.fromData(data, isClassic);

// vesting
case '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount':
return MsgCreatePeriodicVestingAccount.fromData(data, isClassic);
case '/cosmos.vesting.v1beta1.MsgCreateVestingAccount':
return MsgCreateVestingAccount.fromData(data, isClassic);
case '/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens':
return MsgDonateAllVestingTokens.fromData(data, isClassic);

// wasm
case '/terra.wasm.v1beta1.MsgStoreCode':
case '/cosmwasm.wasm.v1.MsgStoreCode':
Expand Down Expand Up @@ -505,14 +480,6 @@ export namespace Msg {
case '/cosmos.staking.v1beta1.MsgEditValidator':
return MsgEditValidator.unpackAny(proto, isClassic);

// vesting
case '/cosmos.vesting.v1beta1.MsgCreatePeriodicVestingAccount':
return MsgCreatePeriodicVestingAccount.unpackAny(proto, isClassic);
case '/cosmos.vesting.v1beta1.MsgCreateVestingAccount':
return MsgCreateVestingAccount.unpackAny(proto, isClassic);
case '/cosmos.vesting.v1beta1.MsgDonateAllVestingTokens':
return MsgDonateAllVestingTokens.unpackAny(proto, isClassic);

// wasm
case '/terra.wasm.v1beta1.MsgStoreCode':
case '/cosmwasm.wasm.v1.MsgStoreCode':
Expand Down
2 changes: 0 additions & 2 deletions src/core/SignatureV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import {
} from '@terra-money/terra.proto/cosmos/tx/signing/v1beta1/signing';
import { MultiSignature } from '@terra-money/terra.proto/cosmos/crypto/multisig/v1beta1/multisig';

export { SignMode } from '@terra-money/terra.proto/cosmos/tx/signing/v1beta1/signing';

export class SignatureV2 {
constructor(
public public_key: PublicKey,
Expand Down
3 changes: 0 additions & 3 deletions src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ export * from './treasury/PolicyConstraints';
// Upgrade
export * from './upgrade';

// Vesting
export * from './vesting';

// WASM
export * from './wasm';
export * from './wasm/msgs';
Expand Down
86 changes: 0 additions & 86 deletions src/core/vesting/Period.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/core/vesting/index.ts

This file was deleted.

26 changes: 0 additions & 26 deletions src/core/vesting/msgs/MsgCreatePeriodicVestingAccount.data.json

This file was deleted.

23 changes: 0 additions & 23 deletions src/core/vesting/msgs/MsgCreatePeriodicVestingAccount.spec.ts

This file was deleted.

Loading

0 comments on commit d15fda3

Please sign in to comment.