Skip to content

Commit

Permalink
chore(packages/template): regenerated vuex
Browse files Browse the repository at this point in the history
  • Loading branch information
marinhoarthur authored Jan 19, 2022
1 parent 8705f1d commit b512779
Show file tree
Hide file tree
Showing 236 changed files with 7,153 additions and 60,522 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,37 +129,37 @@ export default {
throw new SpVuexError('QueryClient:QueryGrants', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async sendMsgExec({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgGrant({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgExec(value);
const msg = await txClient.msgGrant(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgExec:Send', 'Could not broadcast Tx: ' + e.message);
throw new SpVuexError('TxClient:MsgGrant:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
async sendMsgGrant({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgExec({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgGrant(value);
const msg = await txClient.msgExec(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgGrant:Send', 'Could not broadcast Tx: ' + e.message);
throw new SpVuexError('TxClient:MsgExec:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
Expand All @@ -180,33 +180,33 @@ export default {
}
}
},
async MsgExec({ rootGetters }, { value }) {
async MsgGrant({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgExec(value);
const msg = await txClient.msgGrant(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgExec:Create', 'Could not create message: ' + e.message);
throw new SpVuexError('TxClient:MsgGrant:Create', 'Could not create message: ' + e.message);
}
}
},
async MsgGrant({ rootGetters }, { value }) {
async MsgExec({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgGrant(value);
const msg = await txClient.msgExec(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgGrant:Create', 'Could not create message: ' + e.message);
throw new SpVuexError('TxClient:MsgExec:Create', 'Could not create message: ' + e.message);
}
}
},
Expand Down
32 changes: 16 additions & 16 deletions packages/template/src/store/generated/cosmos/cosmos-sdk/cosmos.authz.v1beta1/index.ts
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -149,33 +149,33 @@ export default {
},


async sendMsgExec({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgGrant({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgExec(value)
const msg = await txClient.msgGrant(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.')
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.')
}else{
throw new SpVuexError('TxClient:MsgExec:Send', 'Could not broadcast Tx: '+ e.message)
throw new SpVuexError('TxClient:MsgGrant:Send', 'Could not broadcast Tx: '+ e.message)
}
}
},
async sendMsgGrant({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgExec({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgGrant(value)
const msg = await txClient.msgExec(value)
const result = await txClient.signAndBroadcast([msg], {fee: { amount: fee,
gas: "200000" }, memo})
return result
} catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.')
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.')
}else{
throw new SpVuexError('TxClient:MsgGrant:Send', 'Could not broadcast Tx: '+ e.message)
throw new SpVuexError('TxClient:MsgExec:Send', 'Could not broadcast Tx: '+ e.message)
}
}
},
Expand All @@ -195,30 +195,30 @@ export default {
}
},

async MsgExec({ rootGetters }, { value }) {
async MsgGrant({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgExec(value)
const msg = await txClient.msgGrant(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.')
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.')
}else{
throw new SpVuexError('TxClient:MsgExec:Create', 'Could not create message: ' + e.message)
throw new SpVuexError('TxClient:MsgGrant:Create', 'Could not create message: ' + e.message)

}
}
},
async MsgGrant({ rootGetters }, { value }) {
async MsgExec({ rootGetters }, { value }) {
try {
const txClient=await initTxClient(rootGetters)
const msg = await txClient.msgGrant(value)
const msg = await txClient.msgExec(value)
return msg
} catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgGrant:Init', 'Could not initialize signing client. Wallet is required.')
throw new SpVuexError('TxClient:MsgExec:Init', 'Could not initialize signing client. Wallet is required.')
}else{
throw new SpVuexError('TxClient:MsgGrant:Create', 'Could not create message: ' + e.message)
throw new SpVuexError('TxClient:MsgExec:Create', 'Could not create message: ' + e.message)

}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { StdFee } from "@cosmjs/launchpad";
import { Registry, OfflineSigner, EncodeObject } from "@cosmjs/proto-signing";
import { Api } from "./rest";
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
export declare const MissingWalletError: Error;
export declare const registry: Registry;
Expand All @@ -15,8 +15,8 @@ interface SignAndBroadcastOptions {
}
declare const txClient: (wallet: OfflineSigner, { addr: addr }?: TxClientOptions) => Promise<{
signAndBroadcast: (msgs: EncodeObject[], { fee, memo }?: SignAndBroadcastOptions) => any;
msgExec: (data: MsgExec) => EncodeObject;
msgGrant: (data: MsgGrant) => EncodeObject;
msgExec: (data: MsgExec) => EncodeObject;
msgRevoke: (data: MsgRevoke) => EncodeObject;
}>;
interface QueryClientOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import { SigningStargateClient } from "@cosmjs/stargate";
import { Registry } from "@cosmjs/proto-signing";
import { Api } from "./rest";
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";
const types = [
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke],
];
export const MissingWalletError = new Error("wallet is required");
Expand All @@ -29,8 +29,8 @@ const txClient = async (wallet, { addr: addr } = { addr: "http://localhost:26657
const { address } = (await wallet.getAccounts())[0];
return {
signAndBroadcast: (msgs, { fee, memo } = { fee: defaultFee, memo: "" }) => client.signAndBroadcast(address, msgs, fee, memo),
msgExec: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial(data) }),
msgGrant: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial(data) }),
msgExec: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial(data) }),
msgRevoke: (data) => ({ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.fromPartial(data) }),
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { StdFee } from "@cosmjs/launchpad";
import { SigningStargateClient } from "@cosmjs/stargate";
import { Registry, OfflineSigner, EncodeObject, DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { Api } from "./rest";
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
import { MsgGrant } from "./types/cosmos/authz/v1beta1/tx";
import { MsgExec } from "./types/cosmos/authz/v1beta1/tx";
import { MsgRevoke } from "./types/cosmos/authz/v1beta1/tx";


const types = [
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
["/cosmos.authz.v1beta1.MsgGrant", MsgGrant],
["/cosmos.authz.v1beta1.MsgExec", MsgExec],
["/cosmos.authz.v1beta1.MsgRevoke", MsgRevoke],

];
Expand Down Expand Up @@ -45,8 +45,8 @@ const txClient = async (wallet: OfflineSigner, { addr: addr }: TxClientOptions =

return {
signAndBroadcast: (msgs: EncodeObject[], { fee, memo }: SignAndBroadcastOptions = {fee: defaultFee, memo: ""}) => client.signAndBroadcast(address, msgs, fee,memo),
msgExec: (data: MsgExec): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial( data ) }),
msgGrant: (data: MsgGrant): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgGrant", value: MsgGrant.fromPartial( data ) }),
msgExec: (data: MsgExec): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgExec", value: MsgExec.fromPartial( data ) }),
msgRevoke: (data: MsgRevoke): EncodeObject => ({ typeUrl: "/cosmos.authz.v1beta1.MsgRevoke", value: MsgRevoke.fromPartial( data ) }),

};
Expand Down
Empty file.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -275,67 +275,67 @@ export default {
throw new SpVuexError('QueryClient:QueryDenomsMetadata', 'API Node Unavailable. Could not perform query: ' + e.message);
}
},
async sendMsgMultiSend({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgSend({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgMultiSend(value);
const msg = await txClient.msgSend(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgMultiSend:Send', 'Could not broadcast Tx: ' + e.message);
throw new SpVuexError('TxClient:MsgSend:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
async sendMsgSend({ rootGetters }, { value, fee = [], memo = '' }) {
async sendMsgMultiSend({ rootGetters }, { value, fee = [], memo = '' }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgSend(value);
const msg = await txClient.msgMultiSend(value);
const result = await txClient.signAndBroadcast([msg], { fee: { amount: fee,
gas: "200000" }, memo });
return result;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgSend:Send', 'Could not broadcast Tx: ' + e.message);
throw new SpVuexError('TxClient:MsgMultiSend:Send', 'Could not broadcast Tx: ' + e.message);
}
}
},
async MsgMultiSend({ rootGetters }, { value }) {
async MsgSend({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgMultiSend(value);
const msg = await txClient.msgSend(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgMultiSend:Create', 'Could not create message: ' + e.message);
throw new SpVuexError('TxClient:MsgSend:Create', 'Could not create message: ' + e.message);
}
}
},
async MsgSend({ rootGetters }, { value }) {
async MsgMultiSend({ rootGetters }, { value }) {
try {
const txClient = await initTxClient(rootGetters);
const msg = await txClient.msgSend(value);
const msg = await txClient.msgMultiSend(value);
return msg;
}
catch (e) {
if (e == MissingWalletError) {
throw new SpVuexError('TxClient:MsgSend:Init', 'Could not initialize signing client. Wallet is required.');
throw new SpVuexError('TxClient:MsgMultiSend:Init', 'Could not initialize signing client. Wallet is required.');
}
else {
throw new SpVuexError('TxClient:MsgSend:Create', 'Could not create message: ' + e.message);
throw new SpVuexError('TxClient:MsgMultiSend:Create', 'Could not create message: ' + e.message);
}
}
},
Expand Down
Loading

0 comments on commit b512779

Please sign in to comment.