-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add memo * Memo validation * Fix memo * update docs and tests * Add memo tests * Remove console.log
- Loading branch information
1 parent
ec91924
commit ad5ed54
Showing
9 changed files
with
207 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ const transactions = [ | |
}, | ||
{ | ||
amount: 1, | ||
memo: "hi", | ||
recipient: "fakeAccountNumber", | ||
}, | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
/** The model for thenewboston transactions. */ | ||
export interface Transaction { | ||
amount: number; | ||
recipient: string; | ||
fee?: string; | ||
memo?: string; | ||
recipient: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import type { Account } from "../account"; | ||
import { throwError } from "./throw-error"; | ||
|
||
export class TransferDetails { | ||
public sender: Account; | ||
public recipient: Account | string; | ||
public amount: number; | ||
public memo: string; | ||
|
||
constructor(sender: Account, recipient: Account | string, amount: number) { | ||
constructor(sender: Account, recipient: Account | string, amount: number, memo: string) { | ||
this.sender = sender; | ||
this.recipient = recipient; | ||
this.amount = amount; | ||
this.memo = memo; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.