Withdraw vested button

This commit is contained in:
Alexis Sellier
2021-03-07 23:14:10 +01:00
parent eb63a73e1f
commit 503c8be59c
2 changed files with 19 additions and 1 deletions
+6
View File
@@ -187,6 +187,12 @@ input.wide {
margin-top: 2rem;
text-align: center;
}
.modal-actions > button {
margin-right: 1rem;
}
.modal-actions > button:last-child {
margin-right: 0;
}
table {
table-layout: fixed;
+13 -1
View File
@@ -1,6 +1,7 @@
<script lang="javascript">
import { ethers } from 'ethers';
import { get } from 'svelte/store';
import { get, derived } from 'svelte/store';
import { session } from '@app/session.js';
import { STATE, state } from './state.js';
import { getInfo } from './vesting.js';
@@ -14,6 +15,12 @@
info = await getInfo(contractAddress, config);
state.set(STATE.IDLE);
}
function withdrawVested() {}
let isBeneficiary = derived(session, (s) => {
return info && (info.beneficiary === s.address);
});
</script>
<style>
@@ -49,6 +56,11 @@
</table>
</div>
<div class="modal-actions">
{#if $isBeneficiary}
<button on:click={withdrawVested} class="primary small">
Withdraw
</button>
{/if}
<button on:click={() => info = null} class="small">
Back
</button>