Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4706a65
Merge pull request #1 from GoodDollar/master
Oluwatomilola Mar 8, 2026
1b24321
fix: bump sdk-v2 with reserve fix
L03TJ3 Mar 10, 2026
d603f81
Fix: Restore claim disabled message modal overlay (#611) (#626)
edehvictor Mar 11, 2026
db9dcc4
fixes: insufficient gas error message, disconnect after reload, cache…
L03TJ3 Mar 12, 2026
7a5a0bb
chore: lingui
L03TJ3 Mar 12, 2026
7c911b5
include xdc production contracts
L03TJ3 Mar 16, 2026
5afdf3e
fix: also update gd web3-mono dependencies with goodprotocol xdc prod…
L03TJ3 Mar 16, 2026
1aef4d6
chore: release qa version 1.119.0 [skip build]
gooddollar-techadmin Mar 16, 2026
57d7337
chore: release qa version 1.120.0 [skip build]
gooddollar-techadmin Mar 16, 2026
15edbd1
chore: release prod version 1.121.0 [skip build]
gooddollar-techadmin Mar 16, 2026
bba76ae
fix: enforce reconnect for stale web3-onboard connections
L03TJ3 Mar 17, 2026
460826a
fix: remove legacy model open call
L03TJ3 Mar 17, 2026
5a3a9c5
fix: add option to exclude rpcs that are not working, configure throu…
L03TJ3 Mar 17, 2026
10cedb9
temp-fix: default to show celo price
L03TJ3 Mar 17, 2026
fd3772f
chore: lingui
L03TJ3 Mar 17, 2026
e4d820f
chore: release qa version 1.122.0 [skip build]
gooddollar-techadmin Mar 17, 2026
8dd871a
chore: release prod version 1.123.0 [skip build]
gooddollar-techadmin Mar 17, 2026
760732b
fix: stop forcing celo gas price (#632)
sirpy Apr 6, 2026
70fa39b
chore: release qa version 1.124.0 [skip build]
gooddollar-techadmin Apr 6, 2026
10e1fae
chore: release prod version 1.125.0 [skip build]
gooddollar-techadmin Apr 7, 2026
a789aed
Goodbridge page (#631)
Gutopro Apr 23, 2026
7cd4b19
dont estimate gas on minipay
L03TJ3 Apr 27, 2026
b12739c
remove duplicate key for layerzero bridge feature enabled
L03TJ3 Apr 27, 2026
786bb39
chore: lingui
L03TJ3 Apr 27, 2026
661dc5f
enable lzbridge on dev
L03TJ3 Apr 27, 2026
9ff1c05
bump vercel to fix gh actions deployments
L03TJ3 Apr 27, 2026
d2d04d2
chore: lingui
L03TJ3 Apr 27, 2026
6b86cac
chore: release qa version 1.126.0 [skip build]
gooddollar-techadmin Apr 27, 2026
cb1d4a6
chore: release qa version 1.127.0 [skip build]
gooddollar-techadmin Apr 27, 2026
223467a
chore: release prod version 1.128.0 [skip build]
gooddollar-techadmin Apr 27, 2026
20306ad
feat: integrate savings widget and update FAQ section
Oluwatomilola Apr 29, 2026
77379ca
made corrections
Oluwatomilola Apr 30, 2026
a91d551
Merge remote-tracking branch 'upstream/master' into feat-saving-widge…
Oluwatomilola May 1, 2026
80b1a9c
effected necessary changes
Oluwatomilola May 3, 2026
1b726f3
Update src/components/SideBar.tsx
L03TJ3 May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
"@gooddollar/goodprotocol": "2.2.1",
"@gooddollar/web3sdk": "0.1.58",
"@gooddollar/web3sdk-v2": "^0.4.37",
"@goodsdks/savings-widget": "^1.0.0",
"@headlessui/react": "1.5.0",
"@lingui/format-json": "^4.0.0",
"@lingui/macro": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Faq/Faq.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AdditionalChainId } from 'constants/index'

import { faqs, faqReserveCeloCopy, faqReserveXdcCopy } from './copies'

export type FaqType = 'swap' | 'buy' | 'bridge' | 'goodid' | 'claim' | 'reserve'
export type FaqType = 'swap' | 'buy' | 'bridge' | 'goodid' | 'claim' | 'reserve' | 'savings'

const FaqItem = ({ id, question, answer, links, AltLink }) => {
const { isDesktopView } = useScreenSize()
Expand Down
28 changes: 28 additions & 0 deletions src/components/Faq/copies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,33 @@ const faqClaimCopy: FaqItemCopy[] = [
},
]

const faqSavingsCopy: FaqItemCopy[] = [
{
id: 'whatissavings',
question: `What is the Savings Widget?`,
answer: `The Savings Widget allows you to grow your G$ holdings through yield-generating opportunities. Connect your wallet and earn rewards on your GoodDollar holdings securely and transparently.`,
links: [],
},
{
id: 'howdoesitsavings',
question: `How does it work?`,
answer: `Once connected, your G$ can be staked or used in various yield-generating strategies. The widget displays your balance, potential earnings, and available actions. All transactions are transparent and happen on-chain.`,
links: [],
},
{
id: 'issavingssafe',
question: `Is it safe?`,
answer: `Your funds remain in your control. The smart contracts powering the savings strategies have been audited and follow security best practices. Always verify contract addresses before interacting.`,
links: [],
},
{
id: 'whataresavingsrewards',
question: `What are the rewards?`,
answer: `Rewards vary based on the yield-generating strategy and current market conditions. Check the widget for current rates and estimated earnings. Rewards are typically paid in G$ or other supported tokens.`,
links: [],
},
]

export const faqReserveCeloCopy: FaqItemCopy[] = [
{
id: 'whatsswapreserve',
Expand Down Expand Up @@ -401,4 +428,5 @@ export const faqs = {
goodid: faqGoodIDCopy,
claim: faqClaimCopy,
reserve: faqReserveCeloCopy,
savings: faqSavingsCopy,
}
5 changes: 5 additions & 0 deletions src/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,11 @@ export default function SideBar({ mobile, closeSidebar }: { mobile?: boolean; cl
text: 'Stake',
show: !isMinipay,
},
{
route: '/savings',
text: 'Savings',
show: !networkEnv.includes('production') ?? !isMinipay,
},
{
route: '/portfolio',
text: 'Portfolio',
Expand Down
6 changes: 2 additions & 4 deletions src/pages/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ import { updateUserDarkMode } from '../state/user/actions'
import SideBar from '../components/SideBar'
import TransactionUpdater from '../state/transactions/updater'
import useSendAnalyticsData from 'hooks/useSendAnalyticsData'
import WalletChat from '../components/WalletChat'
import { useIsSimpleApp } from 'state/simpleapp/simpleapp'
import MainPageContainer from 'components/Layout/MainPageContainer'
import { useFeatureFlag } from 'posthog-react-native'
import { isMiniPay } from 'utils/minipay'

export const Beta = styled.div`
Expand Down Expand Up @@ -101,7 +99,7 @@ function App(): JSX.Element {
const isMinipay = isMiniPay()
const { open, url, onClose } = useRedirectNotice()
const { isDesktopView } = useScreenSize()
const walletChatEnabled = useFeatureFlag('wallet-chat')
// const walletChatEnabled = useFeatureFlag('wallet-chat')

void useFaucet()

Expand Down Expand Up @@ -190,7 +188,7 @@ function App(): JSX.Element {
</Web3ReactManager>
</MainPageContainer>
</Wrapper>
{!isSimpleApp && !sidebarOpen && walletChatEnabled && <WalletChat />}
{/* {!isSimpleApp && !sidebarOpen && walletChatEnabled && <WalletChat />} */}
</AppWrap>
</Suspense>
)
Expand Down
41 changes: 41 additions & 0 deletions src/pages/gd/Savings/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import '@goodsdks/savings-widget'
import { useEffect, useRef, useCallback } from 'react'
import { useAppKit, useAppKitAccount, useAppKitProvider } from '@reown/appkit/react'
import type { Provider } from '@reown/appkit/react'
import { PageLayout } from 'components/Layout/PageLayout'

export default function Savings() {
const widgetRef = useRef<
HTMLElement & {
connectWallet?: () => void
web3Provider?: unknown | null
}
>(null)
const { open: openAppKit } = useAppKit()
const { address } = useAppKitAccount()
const { walletProvider } = useAppKitProvider<Provider>('eip155')

const handleConnectWallet = useCallback(async () => {
await openAppKit({ view: 'Connect' })
}, [openAppKit])

// Assign connect wallet handler
useEffect(() => {
const widget = widgetRef.current
if (!widget) return
widget.connectWallet = handleConnectWallet
}, [handleConnectWallet])

// Update web3 provider based on wallet connection state
useEffect(() => {
const widget = widgetRef.current
if (!widget) return
widget.web3Provider = address && walletProvider ? walletProvider : null
}, [address, walletProvider])

return (
<PageLayout title="Savings" faqType="savings">
<gooddollar-savings-widget ref={widgetRef} />
</PageLayout>
)
}
2 changes: 2 additions & 0 deletions src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const Portfolio = lazy(() => import('./pages/gd/Portfolio'))
const MicroBridge = lazy(() => import('./pages/gd/MicroBridge'))
const GoodBridge = lazy(() => import('./pages/gd/GoodBridge'))
const Claim = lazy(() => import('./pages/gd/Claim/'))
const Savings = lazy(() => import('./pages/gd/Savings'))
const GoodId = lazy(() => import('./pages/gd/GoodId'))
const BuyGd = lazy(() => import('./pages/gd/BuyGD'))
const NewsFeedPage = lazy(() => import('./pages/gd/News'))
Expand Down Expand Up @@ -55,6 +56,7 @@ function Routes(): JSX.Element {
<Route exact strict path="/goodid" component={GoodId} />
<Route exact strict path="/buy" component={BuyGd} />
<Route exact strict path="/claim" component={Claim} />
<Route exact strict path="/savings" component={Savings} />
<Route exact strict path="/microbridge" component={MicroBridge} />
<Route exact strict path="/goodbridge" component={GoodBridge} />
<Route exact strict path="/news" component={NewsFeedPage} />
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"baseUrl": "./src",
"typeRoots": ["./node_modules/@types", "./types", "./node_modules/@react-spring/types", "./src"]
},
"include": ["src"],
"include": ["src", "types"],
"exclude": ["node_modules"]
}
19 changes: 19 additions & 0 deletions types/gooddollar-savings-widget.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import 'react'

declare module 'react' {
namespace JSX {
interface IntrinsicElements {
'gooddollar-savings-widget': React.DetailedHTMLProps<
React.HTMLAttributes<HTMLElement>,
HTMLElement
> & {
ref?: React.Ref<
HTMLElement & {
connectWallet?: () => void
web3Provider?: unknown | null
}
>
}
}
}
}
Loading
Loading