You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
BasicTransaction should store the asset property and implement the default behaviour for assetToJSON function, so the transactions don't necessarily need to implement the following constructor:
public constructor(rawTransaction: unknown) {
super(rawTransaction);
const tx = (typeof rawTransaction === 'object' && rawTransaction !== null
? rawTransaction
: {}) as Partial<TransactionJSON>;
// Initializes to empty object if it doesn't exist
this.asset = (tx.asset || {}) as TransferAsset;
}
All of the transaction types implement the assetToJSON function in the same way, which also can be moved to the BasicTransaction:
public assetToJSON(): TransferAsset {
return this.asset;
}
Which version(s) does this affect? (Environment, OS, etc...)
2.0
The text was updated successfully, but these errors were encountered:
Expected behavior
BasicTransaction should store the asset property and implement the default behaviour for
assetToJSON
function, so the transactions don't necessarily need to implement the following constructor:All of the transaction types implement the
assetToJSON
function in the same way, which also can be moved to the BasicTransaction:Which version(s) does this affect? (Environment, OS, etc...)
2.0
The text was updated successfully, but these errors were encountered: