Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/wasm-dot/js/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export class DotTransaction {
* @param material - Chain material from the fullnode. See {@link fromHex}
* for why material is needed at deserialization time.
*/
static fromBytes(bytes: Uint8Array, material?: Material): DotTransaction {
const ctx = material ? createContext(material) : undefined;
static fromBytes(bytes: Uint8Array, material: Material): DotTransaction {
const ctx = createContext(material);
const inner = new WasmTransaction(bytes, ctx);
return new DotTransaction(inner);
}
Expand Down Expand Up @@ -71,8 +71,8 @@ export class DotTransaction {
* @param material - Chain material from the fullnode (genesisHash,
* chainName, specName, specVersion, txVersion, metadata)
*/
static fromHex(hex: string, material?: Material): DotTransaction {
const ctx = material ? createContext(material) : undefined;
static fromHex(hex: string, material: Material): DotTransaction {
const ctx = createContext(material);
const inner = WasmTransaction.fromHex(hex, ctx);
return new DotTransaction(inner);
}
Expand Down
Loading