Deprecate DateTime
This commit is contained in:
@@ -60,6 +60,11 @@
|
||||
- @cosmjs/launchpad-ledger: Renamed to @cosmjs/ledger-amino.
|
||||
- @cosmjs/ledger-amino: `LedgerSigner.sign` method renamed `signAmino`.
|
||||
|
||||
### Deprecated
|
||||
|
||||
- @cosmjs/tendermint-rpc: Deprecate `DateTime` in favour of the free functions
|
||||
`fromRfc3339WithNanoseconds` and `toRfc3339WithNanoseconds`.
|
||||
|
||||
## 0.23.2 (2021-01-06)
|
||||
|
||||
### Security
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
adaptor34,
|
||||
broadcastTxCommitSuccess,
|
||||
Client as TendermintClient,
|
||||
DateTime,
|
||||
toRfc3339WithNanoseconds,
|
||||
} from "@cosmjs/tendermint-rpc";
|
||||
import { assert } from "@cosmjs/utils";
|
||||
|
||||
@@ -114,7 +114,7 @@ export class CosmWasmClient {
|
||||
},
|
||||
height: response.block.header.height,
|
||||
chainId: response.block.header.chainId,
|
||||
time: DateTime.encode(response.block.header.time),
|
||||
time: toRfc3339WithNanoseconds(response.block.header.time),
|
||||
},
|
||||
txs: response.block.txs,
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ import {
|
||||
adaptor34,
|
||||
broadcastTxCommitSuccess,
|
||||
Client as TendermintClient,
|
||||
DateTime,
|
||||
toRfc3339WithNanoseconds,
|
||||
} from "@cosmjs/tendermint-rpc";
|
||||
import { assert, assertDefinedAndNotNull } from "@cosmjs/utils";
|
||||
import Long from "long";
|
||||
@@ -185,7 +185,7 @@ export class StargateClient {
|
||||
},
|
||||
height: response.block.header.height,
|
||||
chainId: response.block.header.chainId,
|
||||
time: DateTime.encode(response.block.header.time),
|
||||
time: toRfc3339WithNanoseconds(response.block.header.time),
|
||||
},
|
||||
txs: response.block.txs,
|
||||
};
|
||||
|
||||
@@ -26,6 +26,7 @@ export function toRfc3339WithNanoseconds(dateTime: ReadonlyDateWithNanoseconds):
|
||||
return `${millisecondIso.slice(0, -1)}${nanoseconds.padStart(6, "0")}Z`;
|
||||
}
|
||||
|
||||
/** @deprecated Use fromRfc3339WithNanoseconds/toRfc3339WithNanoseconds instead */
|
||||
export class DateTime {
|
||||
/** @deprecated Use fromRfc3339WithNanoseconds instead */
|
||||
public static decode(dateTimeString: string): ReadonlyDateWithNanoseconds {
|
||||
|
||||
Reference in New Issue
Block a user