-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3358 from hashgraph/fix/3311
Fix/3311
- Loading branch information
Showing
57 changed files
with
2,950 additions
and
818 deletions.
There are no files selected for viewing
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import { Entity, Property } from '@mikro-orm/core'; | ||
import { BaseEntity } from '../models'; | ||
|
||
/** | ||
* Mint request | ||
*/ | ||
@Entity() | ||
export class MintRequest extends BaseEntity { | ||
/** | ||
* Amount | ||
*/ | ||
@Property() | ||
amount: number; | ||
|
||
/** | ||
* Token identifier | ||
*/ | ||
@Property() | ||
tokenId: string; | ||
|
||
/** | ||
* Target account | ||
*/ | ||
@Property() | ||
target: string; | ||
|
||
/** | ||
* VP message identifier | ||
*/ | ||
@Property() | ||
vpMessageId: string; | ||
|
||
/** | ||
* Secondary VP identifiers | ||
*/ | ||
@Property({ nullable: true }) | ||
secondaryVpIds?: string[] | ||
|
||
/** | ||
* Start serial | ||
*/ | ||
@Property({ nullable: true }) | ||
startSerial?: number | ||
|
||
/** | ||
* Start transaction | ||
*/ | ||
@Property({ nullable: true }) | ||
startTransaction?: string | ||
|
||
/** | ||
* Is mint needed | ||
*/ | ||
@Property({ default: true }) | ||
isMintNeeded: boolean = true; | ||
|
||
/** | ||
* Is transfer needed | ||
*/ | ||
@Property({ default: false }) | ||
isTransferNeeded: boolean = false; | ||
|
||
/** | ||
* Was transfer needed | ||
*/ | ||
@Property({ default: false }) | ||
wasTransferNeeded: boolean = false; | ||
|
||
/** | ||
* Memo | ||
*/ | ||
@Property() | ||
memo: string; | ||
|
||
/** | ||
* Metadata | ||
*/ | ||
@Property({ nullable: true }) | ||
metadata?: string; | ||
|
||
/** | ||
* Error | ||
*/ | ||
@Property({ nullable: true }) | ||
error?: string; | ||
|
||
/** | ||
* Mint date | ||
*/ | ||
@Property({ nullable: true }) | ||
processDate?: Date; | ||
} |
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 |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import { Entity, Enum, Index, Property } from '@mikro-orm/core'; | ||
import { BaseEntity } from '../models'; | ||
import { | ||
MintTransactionStatus, | ||
} from '@guardian/interfaces'; | ||
|
||
/** | ||
* Mint transaction | ||
*/ | ||
@Index({ | ||
properties: ['mintRequestId', 'mintStatus'], | ||
name: 'mint_status_index', | ||
}) | ||
@Index({ | ||
properties: ['mintRequestId', 'transferStatus'], | ||
name: 'transfer_status_index', | ||
}) | ||
@Entity() | ||
export class MintTransaction extends BaseEntity { | ||
/** | ||
* Amount | ||
*/ | ||
@Property() | ||
amount: number; | ||
|
||
/** | ||
* Mint request identifier | ||
*/ | ||
@Property() | ||
mintRequestId: string; | ||
|
||
/** | ||
* Mint status | ||
*/ | ||
@Enum(() => MintTransactionStatus) | ||
mintStatus: MintTransactionStatus; | ||
|
||
/** | ||
* Transfer status | ||
*/ | ||
@Enum(() => MintTransactionStatus) | ||
transferStatus: MintTransactionStatus; | ||
|
||
/** | ||
* Serials | ||
*/ | ||
@Property({ nullable: true }) | ||
serials?: number[]; | ||
|
||
/** | ||
* Error | ||
*/ | ||
@Property({ nullable: true }) | ||
error?: 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
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
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.