mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Add address to "Account does not exist on chain." error message
This commit is contained in:
parent
720d3b211e
commit
7fb06c808e
@ -6,6 +6,11 @@ and this project adheres to
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- @cosmjs/stargate, @cosmjs/cosmwasm-stargate: Add address to "Account does not
|
||||||
|
exist on chain." error message.
|
||||||
|
|
||||||
## [0.29.0] - 2022-09-15
|
## [0.29.0] - 2022-09-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -120,7 +120,7 @@ describe("CosmWasmClient", () => {
|
|||||||
const client = await CosmWasmClient.connect(wasmd.endpoint);
|
const client = await CosmWasmClient.connect(wasmd.endpoint);
|
||||||
const missing = makeRandomAddress();
|
const missing = makeRandomAddress();
|
||||||
await expectAsync(client.getSequence(missing)).toBeRejectedWithError(
|
await expectAsync(client.getSequence(missing)).toBeRejectedWithError(
|
||||||
/account does not exist on chain/i,
|
/account '([a-z0-9]{10,90})' does not exist on chain/i,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -166,7 +166,7 @@ export class CosmWasmClient {
|
|||||||
const account = await this.getAccount(address);
|
const account = await this.getAccount(address);
|
||||||
if (!account) {
|
if (!account) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Account does not exist on chain. Send some tokens there before trying to query sequence.",
|
`Account '${address}' does not exist on chain. Send some tokens there before trying to query sequence.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
@ -182,7 +182,7 @@ describe("StargateClient", () => {
|
|||||||
const client = await StargateClient.connect(simapp.tendermintUrl);
|
const client = await StargateClient.connect(simapp.tendermintUrl);
|
||||||
|
|
||||||
await expectAsync(client.getSequence(nonExistentAddress)).toBeRejectedWithError(
|
await expectAsync(client.getSequence(nonExistentAddress)).toBeRejectedWithError(
|
||||||
/account does not exist on chain/i,
|
/account '([a-z0-9]{10,90})' does not exist on chain/i,
|
||||||
);
|
);
|
||||||
|
|
||||||
client.disconnect();
|
client.disconnect();
|
||||||
|
@ -254,7 +254,7 @@ export class StargateClient {
|
|||||||
const account = await this.getAccount(address);
|
const account = await this.getAccount(address);
|
||||||
if (!account) {
|
if (!account) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
"Account does not exist on chain. Send some tokens there before trying to query sequence.",
|
`Account '${address}' does not exist on chain. Send some tokens there before trying to query sequence.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user