mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-10-31 01:00:47 +08:00
Withdraw vested button
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user