mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
Add Tezos baker min delegation amount property (#2039)
This commit is contained in:
parent
b830afb463
commit
2ea9b74361
4
.github/workflows/update_validators_info.yml
vendored
4
.github/workflows/update_validators_info.yml
vendored
|
@ -1,7 +1,7 @@
|
|||
name: Update Validators Info
|
||||
on:
|
||||
schedule:
|
||||
# Run once per day at 19:00 UTC or 12pm PST
|
||||
# Run once per day at 19:00 UTC or 12PM PST
|
||||
- cron: '0 19 * * *'
|
||||
jobs:
|
||||
update-validators:
|
||||
|
@ -25,4 +25,4 @@ jobs:
|
|||
with:
|
||||
commit_user_name: trust-wallet-merge-bot
|
||||
commit_user_email: mergebot@trustwallet.com
|
||||
commit_message: Daily update
|
||||
commit_message: Update validators info
|
|
@ -8,6 +8,9 @@
|
|||
"commission": 8,
|
||||
"payoutDelay": 1,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -20,9 +23,8 @@
|
|||
"payoutDelay": 1,
|
||||
"payoutPeriod": 5
|
||||
},
|
||||
"status": {
|
||||
"disabled": true,
|
||||
"note": "Must allow minimum delegation 0, current 1000 and to be active, current status active"
|
||||
"staking": {
|
||||
"minDelegation": 1000
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -34,6 +36,9 @@
|
|||
"commission": 30,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -45,6 +50,9 @@
|
|||
"commission": 10,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -56,6 +64,9 @@
|
|||
"commission": 10,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -67,6 +78,9 @@
|
|||
"commission": 15,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -78,6 +92,9 @@
|
|||
"commission": 19,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -89,6 +106,9 @@
|
|||
"commission": 8,
|
||||
"payoutDelay": 1,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -100,6 +120,9 @@
|
|||
"commission": 12.5,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -111,6 +134,9 @@
|
|||
"commission": 40,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -122,6 +148,9 @@
|
|||
"commission": 10,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -134,9 +163,8 @@
|
|||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"status": {
|
||||
"disabled": true,
|
||||
"note": "Must allow minimum delegation 0, current 20 and to be active, current status active"
|
||||
"staking": {
|
||||
"minDelegation": 20
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -148,6 +176,9 @@
|
|||
"commission": 8,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -159,6 +190,9 @@
|
|||
"commission": 9,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -170,6 +204,9 @@
|
|||
"commission": 8,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -182,9 +219,8 @@
|
|||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"status": {
|
||||
"disabled": true,
|
||||
"note": "Must allow minimum delegation 0, current 10 and to be active, current status active"
|
||||
"staking": {
|
||||
"minDelegation": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -196,6 +232,9 @@
|
|||
"commission": 4,
|
||||
"payoutDelay": 1,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -207,6 +246,9 @@
|
|||
"commission": 14.99,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -218,6 +260,9 @@
|
|||
"commission": 10,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -229,6 +274,9 @@
|
|||
"commission": 15,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -240,6 +288,9 @@
|
|||
"commission": 9.95,
|
||||
"payoutDelay": 1,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -251,6 +302,9 @@
|
|||
"commission": 14,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -262,6 +316,9 @@
|
|||
"commission": 8,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -273,6 +330,9 @@
|
|||
"commission": 14.99,
|
||||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"staking": {
|
||||
"minDelegation": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -285,9 +345,8 @@
|
|||
"payoutDelay": 6,
|
||||
"payoutPeriod": 1
|
||||
},
|
||||
"status": {
|
||||
"disabled": true,
|
||||
"note": "Must allow minimum delegation 0, current 100 and to be active, current status active"
|
||||
"staking": {
|
||||
"minDelegation": 100
|
||||
}
|
||||
}
|
||||
]
|
|
@ -24,13 +24,14 @@ import { BakingBadBaker } from "../src/test/models";
|
|||
val.payout.commission = Number((bakerInfo.fee * 100).toFixed(2))
|
||||
val.payout.payoutDelay = bakerInfo.payoutDelay
|
||||
val.payout.payoutPeriod = bakerInfo.payoutPeriod
|
||||
val.staking.minDelegation = bakerInfo.minDelegation
|
||||
|
||||
const freeSpace = Number((bakerInfo.freeSpace).toFixed(0))
|
||||
// Give baker status false if no more capacity
|
||||
// Disable baker if no more capacity
|
||||
if (freeSpace <= 0) {
|
||||
val.status = {
|
||||
"disabled": true,
|
||||
"note": "No more capacity"
|
||||
"note": `No more capacity: ${freeSpace}`
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,10 +40,10 @@ import { BakingBadBaker } from "../src/test/models";
|
|||
delete val.status
|
||||
}
|
||||
|
||||
if (bakerInfo.minDelegation > 0 || bakerInfo.serviceHealth !== "active") {
|
||||
if (bakerInfo.serviceHealth !== "active") {
|
||||
val.status = {
|
||||
"disabled": true,
|
||||
"note": `Must allow minimum delegation 0, current ${bakerInfo.minDelegation} and to be active, current status ${bakerInfo.serviceHealth}`
|
||||
"note": `According to Baking Bad API, baker is not active, current status ${bakerInfo.serviceHealth}, see: https://api.baking-bad.org/v2/bakers/${bakerInfo.address}`,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user