Skip to content

Commit

Permalink
fix: balance include and exclude
Browse files Browse the repository at this point in the history
  • Loading branch information
hz002 committed Dec 20, 2024
1 parent 02d3502 commit b390be7
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@rabby-wallet/object-multiplex": "workspace:^",
"@rabby-wallet/persist-store": "workspace:^",
"@rabby-wallet/rabby-action": "0.1.8",
"@rabby-wallet/rabby-api": "0.9.5-beta.0",
"@rabby-wallet/rabby-api": "0.9.5-beta.2",
"@rabby-wallet/rabby-security-engine": "2.0.7",
"@rabby-wallet/rabby-sign-bvm": "0.1.0",
"@rabby-wallet/rabby-swap": "0.0.43",
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/assets/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2385,7 +2385,7 @@
"unpin": "Unpin",
"fold": "Fold",
"unfold": "Unfold",
"less": "Show Less",
"less": "Less",
"all": "All",
"includeBalance": "Include in Balance",
"excludeBalance": "Exclude from Balance"
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const SignApiPlugin: RabbyApiPlugin = {

export const openapi = new OpenApiService({
store: {
host: __DEV__ ? 'https://alpha.rabby.io' : 'https://app-api.rabby.io',
// host: 'https://alpha.rabby.io',
// host: __DEV__ ? 'https://alpha.rabby.io' : 'https://app-api.rabby.io',
host: 'https://alpha.rabby.io',
},
plugin: SignApiPlugin,
clientName: 'rabbymobile',
Expand Down
1 change: 0 additions & 1 deletion apps/mobile/src/hooks/useCurrentBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default function useCurrentBalance(
} catch (e) {
setBalanceLoading(false);
try {
// TODO: FIX 405
const { error_code, err_chain_ids } = JSON.parse((e as Error).message);
if (error_code === 2) {
const chainNames = err_chain_ids.map((serverId: string) => {
Expand Down
4 changes: 3 additions & 1 deletion apps/mobile/src/screens/Home/AssetContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export const AssetContainer: React.FC<Props> = ({ onRefresh }) => {
openTokenDetailPopup(token);
} else {
console.log('🔍 CUSTOM_LOGGER:=>: handleOpenTokenDetail)', {
id: `${token.chain}:${token._tokenId}`,
pin: token._isPined,
fold: token._isFold,
exclude: token._isExcludeBalance,
Expand All @@ -118,7 +119,7 @@ export const AssetContainer: React.FC<Props> = ({ onRefresh }) => {

const handleOpenDefiDetail = useCallback(
(data: AbstractProject, itemList: AbstractPortfolio[]) => {
console.log('🔍 CUSTOM_LOGGER:=>: data)', data.id);
console.log('🔍 CUSTOM_LOGGER:=>: defi id)', data.id);
if (data.id === DEFI_ID) {
setFoldDefi(pre => !pre);
return;
Expand Down Expand Up @@ -220,6 +221,7 @@ export const AssetContainer: React.FC<Props> = ({ onRefresh }) => {
<RefreshControl
style={styles.bgContainer}
onRefresh={() => {
console.log('🔍 CUSTOM_LOGGER:=>: onRefresh)');
refreshPositions();
onRefresh();
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ const getStyles = createGetStyles2024(ctx => ({
gap: 4,
backgroundColor: ctx.colors2024['neutral-bg-2'],
height: 36,
width: 120,
width: 100,
justifyContent: 'center',
borderRadius: 100,
display: 'flex',
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/screens/NftDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const NFTDetailScreen = () => {
) as {
token: NFTItem;
};
const collectionName = token?.collection?.name || '';
const collectionName = token.contract_name || token?.collection?.name || '';

const TokenDetailHeaderArea = useMemoizedFn(() => {
return (
Expand Down
10 changes: 5 additions & 5 deletions apps/mobile/src/utils/getTokenSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ export const getTokenSettings = async (address: string) => {
?.map(item => `${item.chainid}:${item.id}`) || [];
const excluded_protocol_ids =
excludeDefiAndTokens?.filter(i => i.type === 'defi').map(i => i.id) || [];
console.log('🔍 CUSTOM_LOGGER:=>: getTokenSettings)', {
included_token_uuids,
excluded_token_uuids,
excluded_protocol_ids,
});
// console.log('🔍 CUSTOM_LOGGER:=>: getTokenSettings)', {
// included_token_uuids,
// excluded_token_uuids,
// excluded_protocol_ids,
// });
return {
included_token_uuids,
excluded_token_uuids,
Expand Down
2 changes: 1 addition & 1 deletion packages/biz-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@rabby-wallet/base-utils": "workspace:^",
"@rabby-wallet/rabby-api": "0.9.5-beta.0",
"@rabby-wallet/rabby-api": "0.9.5-beta.2",
"bignumber.js": "^9.1.2",
"ethereumjs-util": "^7.1.5"
},
Expand Down
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6123,7 +6123,7 @@ __metadata:
dependencies:
"@metamask/auto-changelog": ^3.4.3
"@rabby-wallet/base-utils": "workspace:^"
"@rabby-wallet/rabby-api": 0.9.5-beta.0
"@rabby-wallet/rabby-api": 0.9.5-beta.2
"@types/jest": ^27.4.1
"@types/sinon": ^9.0.10
bignumber.js: ^9.1.2
Expand Down Expand Up @@ -6479,9 +6479,9 @@ __metadata:
languageName: node
linkType: hard

"@rabby-wallet/rabby-api@npm:0.9.5-beta.0":
version: 0.9.5-beta.0
resolution: "@rabby-wallet/rabby-api@npm:0.9.5-beta.0"
"@rabby-wallet/rabby-api@npm:0.9.5-beta.2":
version: 0.9.5-beta.2
resolution: "@rabby-wallet/rabby-api@npm:0.9.5-beta.2"
dependencies:
"@rabby-wallet/rabby-sign": 0.4.0
axios: ^0.27.2
Expand All @@ -6492,7 +6492,7 @@ __metadata:
peerDependencies:
"@debank/common": ^0.3.9
"@rabby-wallet/rabby-sign": ">= 0.3"
checksum: fddf4634bf273781f8fb323b603f5326db5ab9ac174223d2fc125c3e8edae73de090780b6bf46e20d1af91f2fd603c16ddbcb53e4a94eb8fe1b57f81fd9be396
checksum: a8b14a745f3613588530502e5ffcfb25befaeef04ab6bb5fa0608092f8f26c83c6fdf8da27e53a2bc7d24dbd9f3ab799d4678bf9263b813f19b148e639e7715b
languageName: node
linkType: hard

Expand Down Expand Up @@ -27490,7 +27490,7 @@ __metadata:
"@rabby-wallet/object-multiplex": "workspace:^"
"@rabby-wallet/persist-store": "workspace:^"
"@rabby-wallet/rabby-action": 0.1.8
"@rabby-wallet/rabby-api": 0.9.5-beta.0
"@rabby-wallet/rabby-api": 0.9.5-beta.2
"@rabby-wallet/rabby-security-engine": 2.0.7
"@rabby-wallet/rabby-sign-bvm": 0.1.0
"@rabby-wallet/rabby-swap": 0.0.43
Expand Down

0 comments on commit b390be7

Please sign in to comment.