@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
39 lines (31 loc) • 831 B
text/typescript
import { Transaction } from "./Transaction";
import { Fee } from "../enum/Fee";
import { Account } from "../enum/Account";
export type SwapType = Swap;
export class Swap extends Transaction {
constructor(
accountToDebit: Account,
accountToCredit: Account,
amount: string,
public speed?: Fee,
public amountToReceive?: string,
public feesAmount?: string,
) {
super(accountToDebit, accountToCredit, amount);
}
public setAmountToReceive(value: string) {
this.amountToReceive = value;
}
public setFeesAmount(value: string) {
this.feesAmount = value;
}
public get getAmount(): string {
return this.amount;
}
public get getAccountToDebit(): Account {
return this.accountToDebit;
}
public get getAccountToCredit(): Account {
return this.accountToCredit;
}
}