Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
shahin-hq committed Nov 5, 2024
1 parent bc77e7e commit d5b8346
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/profiles/source/signed-transaction.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ export class ExtendedSignedTransactionData {
}

public isReturn(): boolean {
if (this.isTransfer() && this.usesMultiSignature()) {
return this.sender() === this.recipient();
}

if (this.isTransfer()) {
return this.isSent() && this.isReceived();
}
Expand Down Expand Up @@ -153,19 +149,13 @@ export class ExtendedSignedTransactionData {

public total(): number {
if (this.isReturn()) {
// console.log("is return", this.id());
return this.amount() - this.fee();
}

// We want to return amount + fee for the transactions using multi-signature
// because the total should be calculated from the sender perspective.
// This is specific for signed - unconfirmed transactions only.
if (this.isSent() || this.usesMultiSignature()) {
// console.log("is sent or usesmusig", this.id(), this.isSent(), this.usesMultiSignature());
if (this.isSent()) {
return this.amount() + this.fee();
}

// console.log("something else", this.id());
let total = this.amount();

if (this.isMultiPayment()) {
Expand Down

0 comments on commit d5b8346

Please sign in to comment.