Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vault description in list & unbonding option(disabled) #649

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ export class VaultComponent implements OnInit {
);
}),
);
this.usdDepositAmount$.subscribe((usdDepositAmount) => console.log(usdDepositAmount));
}

ngOnInit(): void {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,55 @@ <h3 class="font-bold text-lg">Chain that you deposit from</h3>
</div>
<div class="card-body" *ngIf="tab === 'burn'">
<form #withdrawFormRef="ngForm" (submit)="onSubmitWithdraw()">
<div class="form-control">
<label class="label">
<div class="flex flex-row items-center gap-2">
<span class="label-text">Withdrawal Option</span>
<!-- The button to open modal -->
<label for="modal-unbonding" class="label-text cursor-pointer">
<span class="material-symbols-outlined">help</span>
</label>
</div>

<!-- Put this part before </body> tag -->
<input type="checkbox" id="modal-unbonding" class="modal-toggle" />
<div class="modal modal-bottom sm:modal-middle">
<div class="modal-box">
<h3 class="font-bold text-lg">What is the unbonding period?</h3>
<p class="py-4">
The unbonding period is the time required for the asset to be returned after the
request. The unbonding period is set by the chain parameter. You can withdraw
your funds immediately, but a specified fee will be charged.
</p>
<p>
For more information on this fee, visit
<a
href="https://docs.ununifi.io/overview/interchain-yield-aggregator/withdraw-reserve-rate"
target="_blank"
>
<u class="text-info">the UnUniFi Documentation</u> </a
>.
</p>
<div class="modal-action">
<label for="modal-unbonding" class="btn">Okay</label>
</div>
</div>
</div>
</label>
<label class="input-group">
<select
class="select select-bordered w-full"
name="withdrawOption"
[(ngModel)]="withdrawOption.id"
>
<ng-container *ngFor="let option of withdrawOptions">
<option [value]="option.id" [disabled]="option.disabled">
{{ option.display }}
</option>
</ng-container>
</select>
</label>
</div>
<div class="form-control">
<label class="label">
<span class="label-text">Enter amount</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,19 @@ export class VaultComponent implements OnInit, OnChanges {
external: false,
cosmos: true,
};

withdrawOptions = [
{
id: 'immediate',
display: 'Immediate withdrawal',
disabled: false,
},
{
id: 'unbonding',
display: 'Withdrawal after the unbonding period (coming soon)',
disabled: true,
},
];
withdrawOption = this.withdrawOptions[0];
chains: ExternalChain[] = [
{
id: 'ununifi',
Expand Down Expand Up @@ -155,6 +167,7 @@ export class VaultComponent implements OnInit, OnChanges {
this.changeWithdraw = new EventEmitter();
this.appWithdraw = new EventEmitter();
this.appClickChain = new EventEmitter();
this.withdrawOption = this.withdrawOptions[0];
}

ngOnInit(): void {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ <h2 class="card-title">Available Vaults</h2>
<tr>
<th></th>
<td>Name</td>
<td>description</td>
<td>Asset</td>
<td>APY</td>
<td>Commission Rate</td>
Expand All @@ -76,6 +77,22 @@ <h2 class="card-title">Available Vaults</h2>
<tr class="hover cursor-pointer" routerLink="{{ vault.vault?.id }}">
<th>#{{ vault.vault?.id }}</th>
<td>{{ vault.vault?.name }}</td>
<div class="dropdown dropdown-hover items-center">
<label tabindex="0">
<td class="max-w-xs truncate">
{{ vault.vault?.description }}
</td>
</label>
<div
tabindex="0"
class="dropdown-content z-[1] card card-compact w-64 p-2 shadow bg-base-200 text-primary-content"
>
<div class="card-body">
<h3 class="card-title">#{{ vault.vault?.id }} {{ vault.vault?.name }}</h3>
<p>{{ vault.vault?.description || 'No description' }}</p>
</div>
</div>
</div>
<td>
<div class="flex items-center space-x-3 gap-2" *ngIf="symbols">
<ng-container *ngIf="symbols[i]?.img">
Expand Down
Loading