@keplr-wallet/stores
Advanced tools
Comparing version 0.9.7-rc.0 to 0.9.8-rc.0
@@ -299,3 +299,15 @@ "use strict"; | ||
}; | ||
yield this.base.sendMsgs("undelegate", [msg], memo, { | ||
yield this.base.sendMsgs("undelegate", { | ||
aminoMsgs: [msg], | ||
protoMsgs: [ | ||
{ | ||
type_url: "/cosmos.staking.v1beta1.MsgUndelegate", | ||
value: cosmos_1.cosmos.staking.v1beta1.MsgUndelegate.encode({ | ||
delegatorAddress: msg.value.delegator_address, | ||
validatorAddress: msg.value.validator_address, | ||
amount: msg.value.amount, | ||
}).finish(), | ||
}, | ||
], | ||
}, memo, { | ||
amount: (_a = stdFee.amount) !== null && _a !== void 0 ? _a : [], | ||
@@ -302,0 +314,0 @@ gas: (_b = stdFee.gas) !== null && _b !== void 0 ? _b : this.base.msgOpts.undelegate.gas.toString(), |
@@ -5,2 +5,7 @@ import { KVStore } from "@keplr-wallet/common"; | ||
import { ChannelResponse } from "./types"; | ||
export declare class ObservableChainQueryIBCChannel extends ObservableChainQuery<ChannelResponse> { | ||
protected readonly portId: string; | ||
protected readonly channelId: string; | ||
constructor(kvStore: KVStore, chainId: string, chainGetter: ChainGetter, portId: string, channelId: string); | ||
} | ||
export declare class ObservableQueryIBCChannel extends ObservableChainQueryMap<ChannelResponse> { | ||
@@ -7,0 +12,0 @@ protected readonly kvStore: KVStore; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ObservableQueryIBCChannel = void 0; | ||
exports.ObservableQueryIBCChannel = exports.ObservableChainQueryIBCChannel = void 0; | ||
const chain_query_1 = require("../../chain-query"); | ||
const mobx_1 = require("mobx"); | ||
class ObservableChainQueryIBCChannel extends chain_query_1.ObservableChainQuery { | ||
constructor(kvStore, chainId, chainGetter, portId, channelId) { | ||
super(kvStore, chainId, chainGetter, `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}`); | ||
this.portId = portId; | ||
this.channelId = channelId; | ||
mobx_1.autorun(() => { | ||
const chainInfo = this.chainGetter.getChain(this.chainId); | ||
if (chainInfo.features && chainInfo.features.includes("ibc-go")) { | ||
this.setUrl(`/ibc/core/channel/v1/channels/${this.channelId}/ports/${this.portId}`); | ||
} | ||
}); | ||
} | ||
} | ||
exports.ObservableChainQueryIBCChannel = ObservableChainQueryIBCChannel; | ||
class ObservableQueryIBCChannel extends chain_query_1.ObservableChainQueryMap { | ||
@@ -9,3 +24,3 @@ constructor(kvStore, chainId, chainGetter) { | ||
const params = JSON.parse(key); | ||
return new chain_query_1.ObservableChainQuery(this.kvStore, this.chainId, this.chainGetter, `/ibc/core/channel/v1beta1/channels/${params.channelId}/ports/${params.portId}`); | ||
return new ObservableChainQueryIBCChannel(this.kvStore, this.chainId, this.chainGetter, params.portId, params.channelId); | ||
}); | ||
@@ -12,0 +27,0 @@ this.kvStore = kvStore; |
@@ -15,2 +15,8 @@ "use strict"; | ||
super(kvStore, chainId, chainGetter, `/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}/client_state`); | ||
mobx_1.autorun(() => { | ||
const chainInfo = this.chainGetter.getChain(this.chainId); | ||
if (chainInfo.features && chainInfo.features.includes("ibc-go")) { | ||
this.setUrl(`/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/client_state`); | ||
} | ||
}); | ||
} | ||
@@ -17,0 +23,0 @@ /** |
@@ -16,2 +16,8 @@ "use strict"; | ||
this.hash = hash; | ||
mobx_1.autorun(() => { | ||
const chainInfo = this.chainGetter.getChain(this.chainId); | ||
if (chainInfo.features && chainInfo.features.includes("ibc-go")) { | ||
this.setUrl(`/ibc/apps/transfer/v1/denom_traces/${hash}`); | ||
} | ||
}); | ||
} | ||
@@ -18,0 +24,0 @@ get paths() { |
{ | ||
"name": "@keplr-wallet/stores", | ||
"version": "0.9.7-rc.0", | ||
"version": "0.9.8-rc.0", | ||
"main": "build/index.js", | ||
@@ -20,3 +20,3 @@ "author": "chainapsis", | ||
"devDependencies": { | ||
"@keplr-wallet/provider-mock": "^0.9.6" | ||
"@keplr-wallet/provider-mock": "^0.9.7" | ||
}, | ||
@@ -27,6 +27,6 @@ "dependencies": { | ||
"@cosmjs/tendermint-rpc": "^0.24.1", | ||
"@keplr-wallet/background": "^0.9.6", | ||
"@keplr-wallet/common": "^0.9.6", | ||
"@keplr-wallet/cosmos": "^0.9.6", | ||
"@keplr-wallet/crypto": "^0.9.6", | ||
"@keplr-wallet/background": "^0.9.8-rc.0", | ||
"@keplr-wallet/common": "^0.9.7", | ||
"@keplr-wallet/cosmos": "^0.9.7", | ||
"@keplr-wallet/crypto": "^0.9.7", | ||
"@keplr-wallet/router": "^0.9.6", | ||
@@ -45,3 +45,3 @@ "@keplr-wallet/types": "^0.9.6", | ||
}, | ||
"gitHead": "d97f06369ed6410041eb6e1e17dcdd66c10464c4" | ||
"gitHead": "0e215d6473e65b7e564eff5b50eee92093aad77b" | ||
} |
@@ -422,3 +422,15 @@ import { AccountSetBase, AccountSetOpts, MsgOpt } from "./base"; | ||
"undelegate", | ||
[msg], | ||
{ | ||
aminoMsgs: [msg], | ||
protoMsgs: [ | ||
{ | ||
type_url: "/cosmos.staking.v1beta1.MsgUndelegate", | ||
value: cosmos.staking.v1beta1.MsgUndelegate.encode({ | ||
delegatorAddress: msg.value.delegator_address, | ||
validatorAddress: msg.value.validator_address, | ||
amount: msg.value.amount, | ||
}).finish(), | ||
}, | ||
], | ||
}, | ||
memo, | ||
@@ -425,0 +437,0 @@ { |
@@ -8,3 +8,30 @@ import { KVStore } from "@keplr-wallet/common"; | ||
import { ChannelResponse } from "./types"; | ||
import { autorun } from "mobx"; | ||
export class ObservableChainQueryIBCChannel extends ObservableChainQuery<ChannelResponse> { | ||
constructor( | ||
kvStore: KVStore, | ||
chainId: string, | ||
chainGetter: ChainGetter, | ||
protected readonly portId: string, | ||
protected readonly channelId: string | ||
) { | ||
super( | ||
kvStore, | ||
chainId, | ||
chainGetter, | ||
`/ibc/core/channel/v1beta1/channels/${channelId}/ports/${portId}` | ||
); | ||
autorun(() => { | ||
const chainInfo = this.chainGetter.getChain(this.chainId); | ||
if (chainInfo.features && chainInfo.features.includes("ibc-go")) { | ||
this.setUrl( | ||
`/ibc/core/channel/v1/channels/${this.channelId}/ports/${this.portId}` | ||
); | ||
} | ||
}); | ||
} | ||
} | ||
export class ObservableQueryIBCChannel extends ObservableChainQueryMap<ChannelResponse> { | ||
@@ -19,7 +46,8 @@ constructor( | ||
return new ObservableChainQuery<ChannelResponse>( | ||
return new ObservableChainQueryIBCChannel( | ||
this.kvStore, | ||
this.chainId, | ||
this.chainGetter, | ||
`/ibc/core/channel/v1beta1/channels/${params.channelId}/ports/${params.portId}` | ||
params.portId, | ||
params.channelId | ||
); | ||
@@ -26,0 +54,0 @@ }); |
@@ -8,3 +8,3 @@ import { KVStore } from "@keplr-wallet/common"; | ||
import { ClientStateResponse } from "./types"; | ||
import { computed } from "mobx"; | ||
import { autorun, computed } from "mobx"; | ||
@@ -25,2 +25,11 @@ export class ObservableChainQueryClientState extends ObservableChainQuery<ClientStateResponse> { | ||
); | ||
autorun(() => { | ||
const chainInfo = this.chainGetter.getChain(this.chainId); | ||
if (chainInfo.features && chainInfo.features.includes("ibc-go")) { | ||
this.setUrl( | ||
`/ibc/core/channel/v1/channels/${channelId}/ports/${portId}/client_state` | ||
); | ||
} | ||
}); | ||
} | ||
@@ -27,0 +36,0 @@ |
@@ -8,3 +8,3 @@ import { KVStore } from "@keplr-wallet/common"; | ||
import { DenomTraceResponse } from "./types"; | ||
import { computed } from "mobx"; | ||
import { autorun, computed } from "mobx"; | ||
@@ -24,2 +24,9 @@ export class ObservableChainQueryDenomTrace extends ObservableChainQuery<DenomTraceResponse> { | ||
); | ||
autorun(() => { | ||
const chainInfo = this.chainGetter.getChain(this.chainId); | ||
if (chainInfo.features && chainInfo.features.includes("ibc-go")) { | ||
this.setUrl(`/ibc/apps/transfer/v1/denom_traces/${hash}`); | ||
} | ||
}); | ||
} | ||
@@ -26,0 +33,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
817941
16544