Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public update(fileContent: string, hashFunction: HashFunction): TransferTransaction {
this.hash = hashFunction.nonSignedHashing(fileContent);
const creationTransaction = TransferTransaction.create(
Deadline.create(),
this.sinkAddress,
[
new Mosaic(new NamespaceId('nem.xem'), UInt64.fromUint(10)),
],
PlainMessage.create(this.hash),
this.sinkAddress.networkType,
);
return creationTransaction;
}
public update(rawData: string, destAddress?: Address): TransferTransaction {
const plainMessage = PlainMessage.create(rawData);
const creationTransaction = TransferTransaction.create(
Deadline.create(),
destAddress || this.publicAccount.address,
[],
plainMessage,
this.publicAccount.address.networkType,
);
return creationTransaction;
}