diff --git a/.env.example b/.env.example index d87ee1f..75629dc 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,8 @@ PROGRAM_ID= +TOKEN_MINT= SOLANA_RPC_URL=https://api.devnet.solana.com SOLANA_NETWORK=devnet FEE_PAYER_URL=https://localhost:8040/pay-fees UNSTAKE_BASE_URL=http://localhost:3001/creators +REWARDS_BASE_URL=https://localhost:3001/rewards GET_ACS_URL=http://localhost:3001/get-acs diff --git a/.env.production b/.env.production index dbd670a..5c681d0 100644 --- a/.env.production +++ b/.env.production @@ -3,5 +3,6 @@ SOLANA_RPC_URL=https://mainnet.helius-rpc.com/?api-key=6b3f6b84-a89d-485b-bea8-5 SOLANA_NETWORK="mainnet-beta" FEE_PAYER_URL=https://go-api.accessprotocol.co/pay-fees UNSTAKE_BASE_URL=https://hub.accessprotocol.co/creators +REWARDS_BASE_URL=https://hub.accessprotocol.co/rewards GET_ACS_URL=https://hub.accessprotocol.co/get-acs TOKEN_MINT=5MAYDfq5yxtudAhtfyuMBuHZjgAbaS9tbEyEQYAhDS5y diff --git a/.env.staging b/.env.staging index 00d4ab0..01b2b6d 100644 --- a/.env.staging +++ b/.env.staging @@ -3,5 +3,6 @@ SOLANA_NETWORK=devnet SOLANA_RPC_URL=https://api.devnet.solana.com FEE_PAYER_URL=https://st-go-api.accessprotocol.co/pay-fees UNSTAKE_BASE_URL=https://st-app.accessprotocol.co/creators +REWARDS_BASE_URL=https://st-app.accessprotocol.co/rewards GET_ACS_URL=https://st-app.accessprotocol.co/get-acs TOKEN_MINT=5hGLVuE4wHW8mcHUJKEyoJYeg653bj8nZeXgUJrfMxFC diff --git a/html-dev/index.html b/html-dev/index.html index 7339e53..8724db8 100644 --- a/html-dev/index.html +++ b/html-dev/index.html @@ -25,8 +25,8 @@

The shown widget is for demonstration purpose only

_acs('init', { element: document.getElementById('acs'), debug: true, - poolId: 'D9C7Yf5euSjpQ8Wo8XwJP7CWymm54oomeREkogiNf4yS', - poolName: "Coingecko", + poolId: '7VLUA7nEQtppKk2n1Zb3EA7cXZ74SjvHH4bS5NBZSry', + poolName: "Crypto TImes", }); document.querySelector("#acs").addEventListener("connected", (event) => { console.log("Connected to the wallet with address: " + JSON.stringify(event.detail)); diff --git a/package.json b/package.json index cef1ba2..eb0dd56 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ }, "license": "MIT", "devDependencies": { + "@accessprotocol/js": "2.0.0-alpha.33", "@babel/core": "^7.8.3", "@babel/plugin-proposal-class-properties": "^7.8.3", "@babel/plugin-proposal-object-rest-spread": "^7.8.3", diff --git a/src/components/ProgressModal.tsx b/src/components/ProgressModal.tsx index 66e7601..d1aa765 100644 --- a/src/components/ProgressModal.tsx +++ b/src/components/ProgressModal.tsx @@ -2,61 +2,36 @@ import { Fragment, h } from 'preact'; import { RouteLink } from '../layout/Router'; -import { ProgressStep } from './ProgressStep'; import { useContext } from 'preact/hooks'; import { ConfigContext } from '../AppContext'; import { clsxp } from '../libs/utils'; - -const getStepState = ( - current: string, - step: string, - stepOrder: string[], - doneStep: string -) => { - // find if the step is before, current, or after the current step; - const currentStepIndex = stepOrder.indexOf(current); - const stepIndex = stepOrder.indexOf(step); - if (stepIndex < currentStepIndex || current === doneStep) { - return 'complete'; - } - if (stepIndex === currentStepIndex) { - return 'current'; - } - return ''; -}; +import Loading from './Loading'; const ProgressModal = ({ working, - stepOrder, doneStepName, }: { working: string; - stepOrder: string[]; doneStepName: string; }) => { const { classPrefix } = useContext(ConfigContext); return (
- Steps to complete + Sign a transaction
- We need you to sign these -
transactions to stake + { working === doneStepName ? + 'Transaction sent successfully.' : + 'We need you to sign a transaction to lock your funds.' }