-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
534 additions
and
37 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
29 changes: 29 additions & 0 deletions
29
...-limit/transaction-spending-limit-lockup/transaction-spending-limit-lockup.component.html
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,29 @@ | ||
<div class="display--flex justify--between margin-bottom--small"> | ||
<div class="text--left width--25"> | ||
<img | ||
class="avatar--medium avatar--rounded margin-right--xsmall" | ||
[appAvatar]="lockupLimitMapItem?.ProfilePublicKeyBase58Check" | ||
*ngIf=" | ||
lockupLimitMapItem?.ProfilePublicKeyBase58Check && | ||
appUser?.ProfileEntryResponse?.Username | ||
" | ||
/> | ||
{{ | ||
appUser?.ProfileEntryResponse?.Username || | ||
lockupLimitMapItem?.ProfilePublicKeyBase58Check || | ||
(lockupLimitMapItem?.ScopeType === LockupLimitScopeType.ANY | ||
? 'Any Profile' | ||
: 'DESO') | truncateAddressOrUsername | ||
}} | ||
</div> | ||
<div class="display-flex justify--center width--50"> | ||
<code> | ||
{{ getOperationString() }} | ||
</code> | ||
</div> | ||
<div class="width--25 text--right"> | ||
<code> | ||
{{ globalVars.formatTxCountLimit(lockupLimitMapItem?.OpCount) }} | ||
</code> | ||
</div> | ||
</div> |
Empty file.
44 changes: 44 additions & 0 deletions
44
...ng-limit/transaction-spending-limit-lockup/transaction-spending-limit-lockup.component.ts
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,44 @@ | ||
import { Component, Input, OnInit } from '@angular/core'; | ||
import { GlobalVarsService } from 'src/app/global-vars.service'; | ||
import { | ||
LockupLimitMapItem, | ||
LockupLimitOperationString, | ||
LockupLimitScopeType, | ||
User, | ||
} from '../../backend-api.service'; | ||
import { TransactionSpendingLimitComponent } from '../transaction-spending-limit.component'; | ||
|
||
@Component({ | ||
selector: 'app-transaction-spending-limit-lockup', | ||
templateUrl: './transaction-spending-limit-lockup.component.html', | ||
styleUrls: ['./transaction-spending-limit-lockup.component.scss'], | ||
}) | ||
export class TransactionSpendingLimitLockupComponent implements OnInit { | ||
@Input() lockupLimitMapItem: LockupLimitMapItem | undefined; | ||
@Input() appUser: User | undefined; | ||
TransactionSpendingLimitComponent = TransactionSpendingLimitComponent; | ||
LockupLimitScopeType = LockupLimitScopeType; | ||
|
||
constructor(public globalVars: GlobalVarsService) {} | ||
|
||
ngOnInit(): void {} | ||
|
||
getOperationString(): string { | ||
switch (this.lockupLimitMapItem?.Operation) { | ||
case LockupLimitOperationString.ANY: | ||
return 'Any'; | ||
case LockupLimitOperationString.COIN_LOCKUP: | ||
return 'Lockup'; | ||
case LockupLimitOperationString.COIN_LOCKUP_TRANSFER: | ||
return 'Transfer'; | ||
case LockupLimitOperationString.UPDATE_COIN_LOCKUP_YIELD_CURVE: | ||
return 'Update lockup yield curve'; | ||
case LockupLimitOperationString.UPDATE_COIN_LOCKUP_TRANSFER_RESTRICTIONS: | ||
return 'Update transfer restriction'; | ||
case LockupLimitOperationString.COIN_UNLOCK: | ||
return 'Unlock coins'; | ||
default: | ||
return ''; | ||
} | ||
} | ||
} |
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.