Skip to content

Commit

Permalink
FSP-110 feat: support SOL staking (#205)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicole T <[email protected]>
  • Loading branch information
icfor and nicoletting authored Apr 17, 2024
1 parent 20003ca commit 14bc463
Show file tree
Hide file tree
Showing 60 changed files with 3,581 additions and 401 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
"@n8tb1t/use-scroll-position": "^2.0.3",
"@next/bundle-analyzer": "^14.1.0",
"@socialgouv/matomo-next": "^1.8.1",
"@solana/web3.js": "^1.90.0",
"@solflare-wallet/sdk": "^1.4.2",
"@tryghost/admin-api": "^1.13.11",
"@tryghost/content-api": "^1.11.20",
"bignumber.js": "^9.1.2",
Expand Down
3 changes: 3 additions & 0 deletions public/icons/bulb_stars.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions public/icons/external.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions public/icons/info_filled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/icons/stake_account.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
146 changes: 146 additions & 0 deletions public/icons/staking_coins.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
211 changes: 211 additions & 0 deletions public/icons/unstaking_coins.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"blockchain-data-analytics-tools": "Blockchain Data Analytics Tools",
"blog": "Blog",
"brand guide": "Brand Asset",
"close": "Close",
"coming_soon": "Coming Soon",
"Company": "Company",
"contact": "Contact",
Expand Down
68 changes: 62 additions & 6 deletions public/locales/en/staking.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"accounts": "Accounts",
"addressCopied": "Address copied",
"apy": "Annual Percentage Yield",
"benefits bullet 1": "Earn your staking rewards, it allows you to earn rewards for securing the network with your contribution",
Expand All @@ -14,15 +15,17 @@
"claimRewards": {
"claimFrom": "Claim from:",
"selectNetwork": "Select network:",
"solanaInfo": "On solana, your rewards will be distributed automatically to your staking account every 2-3 days, it means you don't need to withdraw it manually!",
"title": "Claim Rewards"
},
"commission": "Commission Rate",
"connectWallet": {
"intro": "Stake with Forbole and earn rewards!",
"leapCreateWallet": "You need to create the Leap wallet in the browser extension, then reload this page.",
"phantomCreateWallet": "Failed to connect to Phantom, make sure the wallet is created and unlocked.",
"success": {
"subtitle": "Welcome 🎉",
"title": "Sign up success"
"title": "You've successfully connected."
},
"title": "Connect Wallet"
},
Expand Down Expand Up @@ -74,7 +77,8 @@
"networkDetails": "See network details",
"stake": "Stake Now",
"unbondingTooltip": "All tokens will have been unbonded by {{period}}",
"unstake": "Unstake"
"unstake": "Unstake",
"withdrawUnstakeAccounts": "Withdraw unstaked tokens"
},
"receiving bullet 1": "Nominated validators are not in the active set",
"receiving bullet 2": "Nominated a validator with 100% commission holders. The rewards rate varies depending on the total amount of staked tokens, and each network has their specific settings.",
Expand Down Expand Up @@ -103,10 +107,29 @@
"select option": "Select an option",
"select token": "Select token",
"showMore": "Show more",
"solanaUnstakeIsReady": {
"subtitle": "Withdraw now",
"title": "Your unstaked $SOL is now withdrawable"
},
"solflareCloseMsg": "If you are using Ledger with Solflare, unlock it, open the Solana app, and enable the <0>necessary setting</0> to sign transactions.",
"stake": "Stake",
"stake desc": "As a token holder, you can utilize our infrastructure by staking your tokens with us",
"stake with us!": "Stake with us!",
"stake_now": "Stake Now",
"stakeAccount": {
"status": {
"activating": "Activating",
"active": "Active",
"deactivating": "Deactivating",
"inactive": "Inactive"
},
"statusTooltip": {
"activating": "The staking rewards will be distributed 2-3 days after your status changes from \"Activating\" to \"Active.\"",
"active": "Your tokens are staked.",
"deactivating": "Unstaked in 2-3 days.",
"inactive": "Your tokens are ready to be withdrawn."
}
},
"staked by forbole": "Staked by Forbole",
"staking": {
"days_one": "{{count}} day",
Expand All @@ -128,10 +151,23 @@
"stakingModal": {
"amountError": {
"invalid": "You have to input a valid amount",
"noBalance": "You don't have any tokens to stake"
"noBalance": "You don't have any tokens to stake",
"notEnough": "The minimum staking amount is {{amount}}"
},
"available": "Available",
"complete": {
"desc1Solana": "The staking rewards will be distributed in <0>2-3 days</0> after your staking status change from <0>\"Activating\"</0> to <0>“Active“</0>.",
"desc2Solana": "Your rewards will be <0>distributed automatically</0> to your staking account <0>every 2-3 days</0>.",
"intro": "Great job on your first staking!",
"release": "Rewards Release",
"tips": "Tips for Solana Staking",
"tipsTooltip": "Each chain has its own staking rules. It means Solana, Cosmos, and Ethereum have different rules.",
"titleComplete": "Staking complete"
},
"error": {
"notEnoughAmountError": {
"title": "You need to stake at least {{amount}}"
},
"notEnoughGas": {
"title": "Gas limit too low, increase gas to complete the transaction."
}
Expand Down Expand Up @@ -172,19 +208,28 @@
"totalStaked": "Total staked",
"trusted provider": "Pick Trusted Provider",
"trusted provider desc": "We have the infrastructure in place to act as validators and to secure networks",
"unbonding period": "Unbonding period",
"unbondingTokens": "Unbonding tokens",
"unbonding period": "Unstaking period",
"unbondingTokens": "Unstaking tokens",
"unstakedTokens": "Unstaked",
"unstaking para 1": "The action of transferring your staked tokens from one validator to another, it is called restaking your tokens. Your rewards will keep calculating if you choose to restake. Your rewards will stop calculating once you choose unstaking. It is subject to a lockup period (normally 21-day) and during this lockup, you cannot do anything with your tokens that are undergoing unlocking.",
"unstaking para 2": "Therefore, if your plan is to continue with staking, and you simply wish to switch to a different validator, use restake instead to continue accruing your staking rewards and airdrops.",
"unstaking para 3": "After the first restaking, you need to wait for a certain period of time (corresponding with unstaking period) before making another restaking transaction. And do make sure you have sufficient funds in your available balance to pay for the transaction fee.",
"unstaking q": "What are unstaking and restaking?",
"unstakingModal": {
"amount": {
"label": "Unstake token amount",
"labelBase": "Amount",
"placeholder": "1,000"
},
"available": "Staked",
"button": "Unstake",
"complete": {
"desc1Solana": "Your tokens are currently in the unstaking period and will be successfully unstaked on <0>{{unstakeDate}}</0>.",
"desc2Solana": "Remember to withdraw your tokens after unstaking period is complete and status changes to \"Unstaked\".",
"intro": "Your tokens are currently in the unstaking period",
"introSub": "Hope to see you again soon.",
"titleComplete": "Unstake successful"
},
"info2T": "During this time, you <1>won't receive</1> staking rewards.",
"info3": "However, if you change your mind, you can cancel the process at any time.",
"info4": "To continue staking after this period, you'll need to stake again.",
Expand All @@ -204,10 +249,21 @@
"votingPower": "Voting Power",
"wallets": {
"keplr": "Keplr",
"leap": "Leap"
"leap": "Leap",
"phantom": "Phantom",
"solflare": "Solflare"
},
"why forbole title": "<0>Forbole <1>empowers</1> people by building decentralized infrastructure.</0>",
"why forbole?": "Why Forbole?",
"withdrawUnstaked": {
"button": "Withdraw",
"fromWallet": "Use wallet:",
"selectAcc": "Select account:",
"success": {
"title": "You have successfully withdrawn your unstaked tokens"
},
"title": "Withdraw tokens from unstaked accounts"
},
"your email": "Your Email",
"your name": "Your Name"
}
1 change: 1 addition & 0 deletions public/locales/zh-CN/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"blockchain-data-analytics-tools": "区块链数据分析工具",
"blog": "部落区",
"brand guide": "品牌应用",
"close": "关闭",
"coming_soon": "快将推出",
"Company": "公司",
"contact": "联络我们",
Expand Down
Loading

0 comments on commit 14bc463

Please sign in to comment.