-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #ATOR-261 coccected smart contracts * Fix contract call * Update Registrator types and store to use bigint for locked tokens * Update Registrator types and store to use bigint for locked tokens * Fix timeout issue in DataTableMyRelays.vue and add success toast in Registrator class * Added hardware relays support * #ATOR-279 added locked tab (#31) * Merge branch 'main' into feature/ATOR-261-lock-relay * Update defaultChain to sepolia in wagmi.config.ts * Prepage for merge * Update relay metadata retrieval in getRelaysInfo function
- Loading branch information
Showing
17 changed files
with
1,677 additions
and
164 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script setup lang="ts"> | ||
defineProps<{ | ||
isLocked?: boolean; | ||
isHardware?: boolean; | ||
isVerified?: boolean; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div v-if="isLocked" class="text-green-300"> | ||
<Icon name="material-symbols:lock" /> | ||
Locked | ||
</div> | ||
<div v-else-if="isHardware" class="text-athena-50"> | ||
<Icon name="material-symbols:memory" /> | ||
Hardware Relay | ||
</div> | ||
<div v-else-if="isVerified" class="text-athena-50">-</div> | ||
<div v-else class="text-orange-300"> | ||
<Icon name="material-symbols:lock" /> | ||
Lock Required | ||
</div> | ||
</template> |
54 changes: 54 additions & 0 deletions
54
components/DataTableMyRelays/columns/RegistrationActionColumn.vue
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,54 @@ | ||
<script setup lang="ts"> | ||
import { type RelayRow } from '@/types/relay'; | ||
const emit = defineEmits<{ | ||
(e: 'relayAction', type: FunctionName, fingerprint: string): void; | ||
(e: 'onLockRelay', fingerprint: string): void; | ||
}>(); | ||
const props = defineProps<{ | ||
row: RelayRow | undefined; | ||
isLocked: boolean; | ||
}>(); | ||
</script> | ||
|
||
<template> | ||
<div class="max-w-32" v-if="props.row"> | ||
<UButton | ||
v-if="!props.isLocked" | ||
size="xl" | ||
color="orange" | ||
variant="outline" | ||
label="Claimed" | ||
class="flex-col text-xs" | ||
@click="emit('onLockRelay', props.row.fingerprint)" | ||
:disabled="row?.isWorking" | ||
block | ||
> | ||
<div class="text-sm font-medium">Lock</div> | ||
<div>Lock 100 $ATOR</div> | ||
</UButton> | ||
<UButton | ||
v-else-if="props.row.status === 'claimable' && props.isLocked" | ||
size="xl" | ||
color="green" | ||
variant="solid" | ||
label="Claim Now" | ||
@click="emit('relayAction', 'claim', props.row.fingerprint)" | ||
:trailing="false" | ||
:disabled="row?.isWorking" | ||
block | ||
/> | ||
<UButton | ||
v-else-if="props.row.status === 'verified' || props.isLocked" | ||
icon="i-heroicons-check-circle-solid" | ||
size="xl" | ||
color="green" | ||
variant="outline" | ||
label="Claimed" | ||
:disabled="true" | ||
:trailing="false" | ||
block | ||
/> | ||
</div> | ||
</template> |
Oops, something went wrong.