Skip to content

Commit bef2fff

Browse files
committed
debug tx and fix
1 parent 3ca4fea commit bef2fff

File tree

8 files changed

+94
-11
lines changed

8 files changed

+94
-11
lines changed

examples/authz/components/authz/GrantCard.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,21 @@ export const GrantCard = ({
8484
const handleRevoke = (permission: PrettyPermission) => {
8585
setIsRevoking(true);
8686

87+
const fee = {
88+
amount: [
89+
{
90+
denom: token.base,
91+
amount: '2500',
92+
},
93+
],
94+
gas: '1000000',
95+
};
96+
8797
revoke(
8898
{
8999
signerAddress,
90100
message: createRevokeMsg(permission),
91-
fee: 'auto',
101+
fee: fee,
92102
memo: 'revoking permission',
93103
},
94104
{

examples/authz/components/authz/GrantDetailsModal.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,21 @@ export const GrantDetailsModal = ({
4949
const handleRevoke = (permissions: PrettyPermission[]) => {
5050
setIsRevoking(true);
5151

52+
const fee = {
53+
amount: [
54+
{
55+
denom: token.base,
56+
amount: '2500',
57+
},
58+
],
59+
gas: '1000000',
60+
};
61+
5262
revoke(
5363
{
5464
signerAddress,
5565
message: permissions.map(createRevokeMsg),
56-
fee: 'auto',
66+
fee: fee,
5767
memo: 'revoking permission',
5868
},
5969
{

examples/authz/components/claim-rewards/Overview.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,21 @@ const Overview = ({
6767
})
6868
);
6969

70+
const fee = {
71+
amount: [
72+
{
73+
denom: token.base,
74+
amount: '2500',
75+
},
76+
],
77+
gas: '1000000',
78+
};
79+
7080
exec(
7181
{
7282
signerAddress: grantee,
7383
message: createExecMsg({ msgs, grantee }),
74-
fee: 'auto',
84+
fee: fee,
7585
memo: 'executing permission',
7686
},
7787
{
@@ -90,9 +100,9 @@ const Overview = ({
90100
<Box mb={{ mobile: '$8', tablet: '$12' }}>
91101
<StakingAssetHeader
92102
imgSrc={
93-
coin.logo_URIs?.png ||
94-
coin.logo_URIs?.svg ||
95-
coin.logo_URIs?.jpeg ||
103+
coin.logoURIs?.png ||
104+
coin.logoURIs?.svg ||
105+
coin.logoURIs?.jpeg ||
96106
''
97107
}
98108
symbol={coin.symbol}

examples/authz/components/send/send.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,21 @@ export const SendSection = ({ chainName }: SendSectionProps) => {
8080
toAddress: recipientAddress,
8181
});
8282

83+
const fee = {
84+
amount: [
85+
{
86+
denom: coin.base,
87+
amount: '2500',
88+
},
89+
],
90+
gas: '1000000',
91+
};
92+
8393
exec(
8494
{
8595
signerAddress: grantee,
8696
message: createExecMsg({ msgs: [msg], grantee }),
87-
fee: 'auto',
97+
fee: fee,
8898
memo: 'executing permission',
8999
},
90100
{

examples/authz/components/staking/DelegateModal.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,21 @@ export const DelegateModal = ({
135135
},
136136
});
137137

138+
const fee = {
139+
amount: [
140+
{
141+
denom: coin.base,
142+
amount: '2500',
143+
},
144+
],
145+
gas: '1000000',
146+
};
147+
138148
exec(
139149
{
140150
signerAddress: grantee,
141151
message: createExecMsg({ msgs: [msg], grantee }),
142-
fee: 'auto',
152+
fee: fee,
143153
memo: 'executing permission',
144154
},
145155
{

examples/authz/components/staking/Overview.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,21 @@ const Overview = ({
6262
})
6363
);
6464

65+
const fee = {
66+
amount: [
67+
{
68+
denom: coin.base,
69+
amount: '2500',
70+
},
71+
],
72+
gas: '1000000',
73+
};
74+
6575
withdrawDelegatorReward(
6676
{
6777
address,
6878
message: msgs,
69-
fee: 'auto',
79+
fee: fee,
7080
memo: 'Claiming rewards',
7181
},
7282
{

examples/authz/components/voting/Proposal.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,21 @@ export function Proposal({
164164
proposalId: proposal.proposalId,
165165
});
166166

167+
const fee = {
168+
amount: [
169+
{
170+
denom: coin.base,
171+
amount: '2500',
172+
},
173+
],
174+
gas: '1000000',
175+
};
176+
167177
exec(
168178
{
169179
signerAddress: grantee,
170180
message: createExecMsg({ msgs: [msg], grantee }),
171-
fee: 'auto',
181+
fee: fee,
172182
memo: 'executing permission',
173183
},
174184
{

examples/authz/pages/_app.tsx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,26 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
4545
assetLists={assetLists}
4646
wallets={[keplrWallet, leapWallet]}
4747
signerOptions={{
48-
preferredSignType: 'direct',
48+
signing: (chain) => {
49+
if (chain === 'juno') {
50+
return {
51+
preferredSignType: 'direct',
52+
broadcast: {
53+
checkTx: true,
54+
deliverTx: true,
55+
},
56+
};
57+
}
58+
},
4959
}}
5060
endpointOptions={{
5161
endpoints: {
5262
osmosis: {
5363
rpc: ['https://rpc.osmosis.zone'],
5464
},
65+
juno: {
66+
rpc: ['https://juno-rpc.stakeandrelax.net/'],
67+
},
5568
},
5669
}}
5770
>

0 commit comments

Comments
 (0)