![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@exodus/balances
Advanced tools
This Exodus SDK feature tracks the crypto-denominated balances for all enabled wallet accounts. For fiat-denominated balances, check out @exodus/fiat-balances.
yarn add @exodus/balances
This feature is designed to be used together with @exodus/headless
. See using the sdk.
selectors.balances.byAsset(store.getState())
in the Dev Tools Console to get balances by asset aggregated across enabled wallet accounts.selectors.balances
. See example usage in tests.// mock your ethereum address with one that has a balance
await exodus.debug.addressProvider.mockAddress({
assetName: 'ethereum',
walletAccount: 'exodus_0',
address: '0x1111111111111111111111111111111111111111',
})
// force tick the ethereum monitor, or wait a while
await exodus.txLogMonitors.update({ assetName: 'ethereum', refresh: true })
// check your balance
selectors.balances
.createTotal({ assetName: 'ethereum', walletAccount: 'exodus_0' })(store.getState())
.toString()
See using the sdk for more details on how features plug into the SDK. Note that the balances feature currently doesn't provide a top level API and is meant to be used purely through selectors.
If you're building a feature that requires balances, add a dependency on the balancesAtom
as below. See also the available balance fields.
const myModuleDefinition = {
id: 'myModule',
type: 'module',
factory: ({ balancesAtom }) => {
const doSomethingSpecial = async () => {
// {
// [walletAccount]: {
// [assetName]: {
// // e.g. 'total', 'spendable', 'unconfirmedSent', 'unconfirmedReceived'
// [balanceField]: NumberUnit, // see @exodus/currency
// }
// }
// }
const { balances } = await balancesAtom.get()
// ...
}
return {
doSomethingSpecial,
}
},
dependencies: ['balancesAtom'],
}
See using the sdk for more details on basic UI-side setup.
import { selectors } from '~/ui/flux'
const MyComponent = () => {
const bitcoinBalance = useSelector(
selectors.balances.createSpendable({
assetName: 'bitcoin',
walletAccount: 'exodus_0',
})
) // returns a NumberUnit
}
Do NOT introduce any asset specifics like if (assetName === 'dogicorn') balance = balance.mul(2)
. All asset-specifics belong in asset.api.getBalances
or other APIs inside the asset libraries.
FAQs
Tracks crypto balances across enabled wallet accounts.
The npm package @exodus/balances receives a total of 1,690 weekly downloads. As such, @exodus/balances popularity was classified as popular.
We found that @exodus/balances demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.