Resolve "feat(Primitives): Have Bytes Primitive extends Uint8Array (if possible)"
This commit is contained in:
@@ -212,7 +212,7 @@ export class Transaction extends BaseTransaction {
|
||||
* @returns {Transaction} The created Transaction Primitive.
|
||||
*/
|
||||
public static fromHex(hex: string): Transaction {
|
||||
const bytes = Bytes.fromHex(hex).toBytes();
|
||||
const bytes = Bytes.fromHex(hex).toUint8Array();
|
||||
return this.fromBytes(bytes);
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ export class TransactionResolved extends BaseTransaction {
|
||||
* @returns {Transaction} The created Transaction Primitive.
|
||||
*/
|
||||
public static fromHex(hex: string, sourceOutputs: Array<any>) {
|
||||
const bytes = Bytes.fromHex(hex).toBytes();
|
||||
const bytes = Bytes.fromHex(hex).toUint8Array();
|
||||
return this.fromBytes(bytes, sourceOutputs);
|
||||
}
|
||||
|
||||
@@ -425,7 +425,7 @@ export class TransactionHash {
|
||||
* @returns {TransactionHash} Instance of TransactionHash.
|
||||
*/
|
||||
public static fromHex(hex: string): TransactionHash {
|
||||
const bytes = Bytes.fromHex(hex).toBytes();
|
||||
const bytes = Bytes.fromHex(hex).toUint8Array();
|
||||
return this.fromBytes(bytes);
|
||||
}
|
||||
|
||||
@@ -469,7 +469,7 @@ export class TransactionHash {
|
||||
* @returns {TransactionHash} Instance of TransactionHash.
|
||||
*/
|
||||
public static fromTransactionHex(transactionHex: string): TransactionHash {
|
||||
const bytes = Bytes.fromHex(transactionHex).toBytes();
|
||||
const bytes = Bytes.fromHex(transactionHex).toUint8Array();
|
||||
return this.fromTransactionBytes(bytes);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user