Skip to content

Commit

Permalink
Merge pull request #54 from GalaxyPay/dev
Browse files Browse the repository at this point in the history
responsive dash; ineligible reasons
  • Loading branch information
acfunk authored Jan 17, 2025
2 parents 1558341 + 9b1a4d1 commit a860e98
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,5 +266,5 @@ jobs:
uses: ncipollo/release-action@v1
with:
allowUpdates: true
tag: v3.2.1
tag: v3.2.2
artifacts: "Output/*"
2 changes: 1 addition & 1 deletion FUNC.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "FUNC"
#define MyAppVersion "3.2.1"
#define MyAppVersion "3.2.2"
#define MyAppPublisher "Galaxy Pay, LLC"
#define MyAppPublisherURL "https://galaxy-pay.com"
#define MyPublishPath "publish"
Expand Down
2 changes: 1 addition & 1 deletion create-package-deb.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
rm -r Output

PKG=Output/func_3.2.1_linux-$1
PKG=Output/func_3.2.2_linux-$1

mkdir -p $PKG/lib/systemd/system
mkdir -p $PKG/opt/func
Expand Down
2 changes: 1 addition & 1 deletion create-package-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ pkgbuild --root publish \
--install-location /opt/func \
--scripts pkg/scripts \
--identifier func.app \
Output/func_3.2.1_darwin-$1.pkg
Output/func_3.2.2_darwin-$1.pkg
2 changes: 1 addition & 1 deletion deb/amd64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.2.1
Version: 3.2.2
Section: base
Priority: optional
Architecture: amd64
Expand Down
2 changes: 1 addition & 1 deletion deb/arm64/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: func
Version: 3.2.1
Version: 3.2.2
Section: base
Priority: optional
Architecture: arm64
Expand Down
2 changes: 1 addition & 1 deletion webui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "func-webui",
"version": "3.2.1",
"version": "3.2.2",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
13 changes: 7 additions & 6 deletions webui/src/components/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<div v-if="nodeStatus">
<v-progress-linear indeterminate v-show="loading" class="mb-n1" />
<v-container class="pl-5" fluid>
<v-row>
<v-col cols="3">
<v-row justify="center">
<v-col cols="12" sm="6" md="3">
<div class="py-1">
<v-badge floating dot class="mx-3 mb-1" :color="createdColor" />
Service Created
Expand Down Expand Up @@ -71,7 +71,7 @@
/>
</v-col>
<template v-if="nodeStatus.serviceStatus === 'Running'">
<v-col cols="3" class="text-center">
<v-col cols="6" md="3" class="text-center">
<div class="text-h4" style="white-space: nowrap">
{{
algodStatus
Expand All @@ -85,7 +85,7 @@
</div>
<div>Online Accounts</div>
</v-col>
<v-col cols="3" class="text-center">
<v-col cols="6" md="3" class="text-center">
<div class="text-h4">
{{
partDetails?.proposals == null
Expand Down Expand Up @@ -113,7 +113,7 @@
</div>
<div>Online Stake</div>
</v-col>
<v-col cols="3" class="text-center">
<v-col cols="6" md="3" class="text-center">
<div class="text-h4">
{{
partDetails?.votes == null
Expand Down Expand Up @@ -330,7 +330,8 @@ const algodClient = computed(() => {
watch(
() => algodStatus.value,
(val) => {
if (val?.["last-round"] >= 46512890) store.isIncentiveReady = true;
if (props.name === "Algorand" && val?.["last-round"] >= 46512890)
store.isIncentiveReady = true;
}
);
Expand Down
27 changes: 17 additions & 10 deletions webui/src/components/Participation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
@click="registerKey(item)"
v-show="
activeAccount?.address === item.address &&
(!isKeyActive(item) || incentiveIneligible(item.address))
(!isKeyActive(item) ||
(incentiveIneligible(item.address).val &&
!incentiveIneligible(item.address).reason))
"
/>
<v-list-item
Expand Down Expand Up @@ -384,20 +386,24 @@ function isKeyActive(item: Participation) {
function incentiveIneligible(addr: string) {
if (!store.isIncentiveReady || activeNetwork.value !== "mainnet")
return false;
return { val: false, reason: "Not Supported" };
const acctInfo = acctInfos.value.find((ai) => ai.address === addr);
return (
(acctInfo?.amount || 0) >= 3 * 10 ** 10 &&
(acctInfo?.amount || 0) < 7 * 10 ** 16 &&
!acctInfo?.incentiveEligible
);
if ((acctInfo?.amount || 0) < 3 * 10 ** 10)
return { val: true, reason: "Balance Too Low" };
if ((acctInfo?.amount || 0) >= 7 * 10 ** 13)
return { val: true, reason: "Balance Too High" };
return { val: !acctInfo?.incentiveEligible, reason: "" };
}
function keyStatus(item: Participation) {
const ii = incentiveIneligible(item.address);
return !isKeyActive(item)
? { text: "Unregistered", color: "red" }
: incentiveIneligible(item.address)
? { text: "Ineligible For Incentives", color: "warning" }
: ii.val
? {
text: `Ineligible For Incentives${ii.reason ? ": " + ii.reason : ""}`,
color: "warning",
}
: { text: "Online", color: "success" };
}
Expand Down Expand Up @@ -467,7 +473,8 @@ async function registerKey(item: Participation) {
store.overlay = true;
const atc = new algosdk.AtomicTransactionComposer();
const suggestedParams = await props.algodClient.getTransactionParams().do();
if (incentiveIneligible(item.address)) {
const ii = incentiveIneligible(item.address);
if (ii.val && !ii.reason) {
suggestedParams.flatFee = true;
suggestedParams.fee = 2 * 10 ** 6;
}
Expand Down

0 comments on commit a860e98

Please sign in to comment.