diff --git a/LICENSE b/LICENSE index 735df13e..bf18d722 100644 --- a/LICENSE +++ b/LICENSE @@ -8,14 +8,84 @@ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. Parameters -Licensor: Babylon Labs, Ltd. - -Licensed Work: simple-staking - The Licensed Work is (c) 2024 Babylon Labs, Ltd. - -Additional Use Grant: None. - -Change Date: 2027-05-15 (March 15th, 2027] +Licensor: Babylon Labs Ltd. + +Licensed Work: Simple Staking + The Licensed Work is (c) 2024 Babylon Labs Ltd. + +Additional Use Grant: + +In addition to the uses permitted under the non-production license below, +we grant you a limited, non-exclusive, non-transferable, non-sublicensable, +revocable license, limited as set forth below, to use the Licensed Work +in this repository for production commercial uses built on or using and integrated +with the Babylon Protocol, not including Competing Uses. + +Any use beyond the scope of this license, including uses that are not built on or +using and integrated with the Babylon Protocol, or are Competing Uses, +will terminate this license to you, automatically and without notice. + +This License applies separately and solely to the specific versions of the Licensed Work +in the specified repository on or before the date of this License, and we may require a +different license and different provisions for each subsequent version of the +Licensed Work released by us. + +"Babylon Labs", "we", "our", or "us" means Babylon Labs Ltd. + +"Babylon Protocol" means the Bitcoin staking protocol as further described in the documentation +here (https://docs.babylonlabs.io/docs/introduction/babylon-overview), as updated from time to time. + +"Competing Use" means any use of the Licensed Work in any product, software, protocol, network, +application, or service that is made available to any party and that +(i) substitutes for the use of the Babylon Protocol, +(ii) offers the same or substantially similar functionality as the Babylon Protocol or +(iii) is built on or uses a protocol with substantially similar functionality as the Babylon Protocol +or otherwise facilitates the staking of bitcoin other than by utilizing the Babylon Protocol. + +The provisions in this License apply to each individual, entity, group, or association +(each and collectively, "you" or "your") who uses the Licensed Work for production, +and you agree to such provisions. Your production use of the Licensed Work is conditional on your +agreement to this License. If you do not agree and consent to be bound to this License, +do not so use the Software. + +If you do not fall within the limited scope of this license as described above or below, +or are otherwise not in strict compliance with this License, then this production license does not +extend to you and does not grant you any production use, including any copying, distributing, or +making any derivative use of the Licensed Work for production purposes. + +Limited Scope of License. Your commercial production license to the Licensed Work +under this License does not extend to any use: + +1. unless you have legal capacity to consent and agree to be bound by this License; +2. unless you have the technical knowledge necessary or advisable to understand and evaluate the + risks of using the Licensed Work and the Babylon Protocol; +3. if you are a resident or agent of, or an entity organized, incorporated or doing business in, + Afghanistan, Belarus, Bosnia and Herzegovina, Burundi, Central African Republic, Crimea, Cuba, + Democratic People's Republic of Korea, Democratic Republic of the Congo, + Donetsk or Luhansk Regions of Ukraine, Eritrea, Guinea, Guinea-Bissau, Haiti, Iran, Iraq, Lebanon, + Libya, Mali, Myanmar, Nicaragua, Russia, Somalia, South Sudan, Sudan, Syria, Venezuela, Yemen, + or Zimbabwe or any other country to which the United States, the United Kingdom, + the European Union or any of its member states or the United Nations or any of its member states + (collectively, the "Major Jurisdictions") embargoes goods or imposes sanctions + (such embargoed or sanctioned territories, collectively, the "Restricted Territories"); +4. if you are, or if you directly or indirectly own or control, from any person or entity that is + listed on any sanctions list or equivalent maintained by any of the Major Jurisdictions + (collectively, "Sanctions Lists Persons"); +5. to transact in or with any Restricted Territories or Sanctions List Persons; +6. if you are a U.S. Person as defined in 17 CFR ยง 230.902, or currently or ordinarily located or + resident in (or incorporated or organized in) the United States of America, Canada, or + Australia (collectively, "Excluded Jurisdictions"), or to transact in or with Excluded Jurisdictions; +7. to defraud, or otherwise materially mislead, any person; +8. in violation of applicable laws, rules or regulations in your relevant jurisdiction; +9. that circumvents any sanctions or export controls targeting you or the country or territory where + you are located; or +10. in any activity that transmits, exchanges, or is otherwise supported by the direct or indirect + proceeds of criminal or fraudulent activity. + +Any production use of the Licensed Work by you confirms your agreement to the foregoing limitations, +and your understanding and agreement that they are limitations and not restrictions. + +Change Date: 2027-03-15 (March 15th, 2027) Change License: Apache 2.0 diff --git a/package-lock.json b/package-lock.json index d310daa2..f2c8badb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "simple-staking", - "version": "0.2.33", + "version": "0.2.36", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "simple-staking", - "version": "0.2.33", + "version": "0.2.36", "dependencies": { "@bitcoinerlab/secp256k1": "^1.1.1", "@keystonehq/animated-qr": "^0.8.6", diff --git a/package.json b/package.json index 0029140f..28d55751 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "simple-staking", - "version": "0.2.33", + "version": "0.2.36", "private": true, "scripts": { "dev": "next dev", diff --git a/src/app/components/Footer/Footer.tsx b/src/app/components/Footer/Footer.tsx index 09ba31e6..170e4060 100644 --- a/src/app/components/Footer/Footer.tsx +++ b/src/app/components/Footer/Footer.tsx @@ -40,7 +40,7 @@ const iconLinks = [ }, { name: "Medium", - url: "https://medium.com/babylonchain-io", + url: "https://medium.com/babylonlabs-io", Icon: BsMedium, }, { diff --git a/src/app/components/Modals/ConnectModal.tsx b/src/app/components/Modals/ConnectModal.tsx index 7ff42c9f..3bd37d67 100644 --- a/src/app/components/Modals/ConnectModal.tsx +++ b/src/app/components/Modals/ConnectModal.tsx @@ -102,7 +102,9 @@ export const ConnectModal: React.FC = ({ }; const buildInjectableWallet = (shouldDisplay: boolean, name: string) => { - if (!shouldDisplay) { + // NOTE: The 'OneKey (Browser)' special case here is a temporary solution + // while waiting for the OneKey wallet to release their fixes + if (!shouldDisplay || injectedWalletProviderName === "OneKey (Browser)") { return null; } diff --git a/src/app/components/Modals/PreviewModal.tsx b/src/app/components/Modals/PreviewModal.tsx index b6a78118..33a653f8 100644 --- a/src/app/components/Modals/PreviewModal.tsx +++ b/src/app/components/Modals/PreviewModal.tsx @@ -18,6 +18,7 @@ interface PreviewModalProps { feeRate: number; unbondingTimeBlocks: number; confirmationDepth: number; + unbondingFeeSat: number; } export const PreviewModal: React.FC = ({ @@ -31,6 +32,7 @@ export const PreviewModal: React.FC = ({ stakingFeeSat, feeRate, confirmationDepth, + unbondingFeeSat, }) => { const cardStyles = "card border bg-base-300 p-4 text-sm dark:border-0 dark:bg-base-200"; @@ -76,7 +78,7 @@ export const PreviewModal: React.FC = ({

Term

{blocksToDisplayTime(stakingTimeBlocks)}

-
+

On-demand unbonding

@@ -85,12 +87,20 @@ export const PreviewModal: React.FC = ({ time)

+
+

Unbonding fee

+

{`${maxDecimals(satoshiToBtc(unbondingFeeSat), 8)} ${coinName}`}

+

Attention!

1. Your stake may "overflow" the staking TVL cap and need to - be unbonded and withdrawn, which will cost you extra transaction fees. - So please stake wisely. + be unbonded and withdrawn, which will cost you {coinName} transaction + fees. So please stake wisely. Unbonding will cost you a static + transaction fee of{" "} + {`${maxDecimals(satoshiToBtc(unbondingFeeSat), 8)} ${coinName}`} + , while the withdrawal fee depends on network conditions. All fees go + to the {coinName} miners.

2. No third party possesses your staked {coinName}. You are the only diff --git a/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx b/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx index e93cb32c..ea0fb7d9 100644 --- a/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx +++ b/src/app/components/Staking/FinalityProviders/FinalityProviders.tsx @@ -102,7 +102,9 @@ export const FinalityProviders: React.FC = ({ return ( <> -

Select a finality provider.

+

+ Step-1: Select a finaltiy provider +

diff --git a/src/app/components/Staking/Form/StakingAmount.tsx b/src/app/components/Staking/Form/StakingAmount.tsx index 2ce5d531..9da311e2 100644 --- a/src/app/components/Staking/Form/StakingAmount.tsx +++ b/src/app/components/Staking/Form/StakingAmount.tsx @@ -94,7 +94,6 @@ export const StakingAmount: React.FC = ({ } else { setError(""); onStakingAmountSatChange(satoshis); - setValue(maxDecimals(satoshiToBtc(satoshis), 8).toString()); } }, [ btcWalletBalanceSat, @@ -126,7 +125,7 @@ export const StakingAmount: React.FC = ({ = ({ maxStakingTimeBlocks, unbondingTime, confirmationDepth, + unbondingFeeSat, } = stakingParams; // Staking time is fixed @@ -604,7 +605,9 @@ export const Staking: React.FC = ({ return ( <> -

Set up staking terms

+

+ Step-2: Set up staking terms +

= ({ confirmationDepth={confirmationDepth} feeRate={feeRate} unbondingTimeBlocks={unbondingTime} + unbondingFeeSat={unbondingFeeSat} /> )}
diff --git a/src/app/components/Summary/Summary.tsx b/src/app/components/Summary/Summary.tsx index eef644b1..344220d4 100644 --- a/src/app/components/Summary/Summary.tsx +++ b/src/app/components/Summary/Summary.tsx @@ -73,8 +73,22 @@ export const Summary: React.FC = ({
-
-

Balance

+
+
+

Stakable Balance

+ + + + +
{typeof btcWalletBalanceSat === "number" ? ( @@ -90,7 +104,7 @@ export const Summary: React.FC = ({ href="https://discord.com/invite/babylonglobal" target="_blank" rel="noopener noreferrer" - className="font-light text-primary hover:underline text-right lg:text-left" + className="font-light text-primary hover:underline text-right" > Get Test Tokens diff --git a/src/config/index.ts b/src/config/index.ts index 88fc21ef..ec639445 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -10,5 +10,5 @@ export const shouldDisplayTestingMsg = (): boolean => { export const getNetworkAppUrl = (): string => { return shouldDisplayTestingMsg() ? "https://btcstaking.testnet.babylonchain.io" - : "https://btcstaking.babylonchain.io"; + : "https://btcstaking.babylonlabs.io"; };