Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Cross chain #2237

Open
wants to merge 78 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
fb786bd
feat(HW-941): Remove restore screen
devkudasov Nov 11, 2024
9e5bf8f
feat(HW-941): Remove SSS from settings
devkudasov Nov 11, 2024
e90f231
feat(HW-941): Remove replace option from SSS migration
devkudasov Nov 12, 2024
bf27f4e
feat(HW-941): Translation fix
devkudasov Nov 12, 2024
99caa31
feat(HW-885): TransactionStore first implementation
devkudasov Nov 14, 2024
aab3a41
feat(HW-885): Update address input based on TransactionStore
devkudasov Nov 14, 2024
aa36354
fix: package.json & yarn.lock to reduce vulnerabilities (#2094)
olegshilov Nov 14, 2024
df49f43
[Snyk] Fix for 6 vulnerabilities (#2200)
onsails Nov 14, 2024
bcfe6d6
fix: long wallet names (#2198)
iGroza Nov 14, 2024
2fec3b8
chore: Setup MMKV as default storage for persistance (#2203)
devkudasov Nov 15, 2024
c3d0266
fix(HW-955): Block swipe down on Account import/create flow (#2202)
iGroza Nov 15, 2024
be36d29
fix: Cart Wallet styles (#2207)
devkudasov Nov 18, 2024
c9fd2f8
fix: wallet card name (#2209)
iGroza Nov 19, 2024
c01a4de
feat(HW-967): watch only wallet (#2212)
iGroza Nov 20, 2024
ff1abee
chore: Hide remove sss button (#2219)
devkudasov Nov 22, 2024
b8765fd
feat(HW-966): immediatly re-create SSS cloud share (#2220)
iGroza Nov 25, 2024
e9e9839
remove imports
devkudasov Nov 28, 2024
fb8beee
feat(HW-885): Refactor transaction-address screen layout
devkudasov Nov 28, 2024
3b5d767
feat(HW-885): Network select
devkudasov Nov 28, 2024
681ebbe
nfts and tokens send
devkudasov Nov 28, 2024
974f470
fix useCallback deps
devkudasov Nov 28, 2024
9bbde08
feat(HW-886): Auto network select
devkudasov Nov 29, 2024
eeb4f16
feat(HW-888): Network provider select screen for transaction
devkudasov Nov 29, 2024
79073b3
feat(HW-887): Disable networks which unsupport entered address
devkudasov Nov 29, 2024
5d86578
feat(HW-888): Fix disable continue condition
devkudasov Dec 5, 2024
6c2df65
Remove unused code
devkudasov Dec 6, 2024
eada615
fix(HW-988): transaction navigation issues
devkudasov Dec 6, 2024
d0c03b6
fix(HW-988): Remove multiline for address input
devkudasov Dec 6, 2024
24f66e0
fix(HW-988): Select provider specific address and not update selected…
devkudasov Dec 6, 2024
d74a11a
feat(HW-892): SearchInput component
devkudasov Nov 29, 2024
ec16201
feat(HW-892): Search input for Select crypto screen
devkudasov Nov 29, 2024
10be702
feat(HW-892): Type assets selector
devkudasov Nov 29, 2024
8269cf3
feat(HW-892): Switch between cryptos and nfts
devkudasov Nov 29, 2024
5a93778
feat(HW-893): Network selector
devkudasov Nov 29, 2024
fc255be
feat(HW-885): Select network when owner card selected
devkudasov Dec 22, 2024
350aeb7
Remove lint issues
devkudasov Dec 22, 2024
c2022f4
Merge branch 'main' into feat/cross-chain
devkudasov Jan 13, 2025
5cbb241
feat(HW-884): set toAddress fixes
devkudasov Jan 13, 2025
fdfa069
feat(HW-894): assets lists updates
devkudasov Jan 13, 2025
ee44508
feat(HW-895): Address selector updates
devkudasov Jan 13, 2025
ac6d75e
feat(HW-909): Store refactoring
devkudasov Jan 14, 2025
faa217a
fix: web3 browser signing (#2254)
iGroza Jan 14, 2025
646afda
feat(HW-897): Action blocks for TransfetAmount screen
devkudasov Jan 14, 2025
f43ff60
HW(897): Amount input
devkudasov Jan 14, 2025
765ead9
feat(HW-897): Arrow divider
devkudasov Jan 14, 2025
01a989f
feat(HW-899): Cross chain transfer screen
devkudasov Jan 16, 2025
4e323a9
fix(HW-1035): Zero token balances on Swap
Jan 14, 2025
019bf3c
feat: open network logger from DevSettings (#2256)
iGroza Jan 14, 2025
0562c34
fix(HW-1035): Zero token balances on Swap (#2255)
iGroza Jan 15, 2025
82efe0c
chore: fix some typos in comment (#2252)
loselarry Jan 15, 2025
e0a7993
feat: remove ATT skip button (#2257)
iGroza Jan 16, 2025
ff657bb
fix(HW-1035): Zero token balances on Swap (#2255) (#2258)
iGroza Jan 16, 2025
5a37cbe
build
invalid-email-address Jan 16, 2025
dc78e95
feat(HW-900): Max amount input check
devkudasov Jan 20, 2025
2419991
Merge branch 'main' into feat/cross-chain
devkudasov Jan 20, 2025
7d31e74
feat(HW-900): Fiat calculation for input from
devkudasov Jan 20, 2025
7930176
feat(HW-900): Testnet filter
devkudasov Jan 20, 2025
30a6788
feat(HW-900): Disable network select if testnet selected
devkudasov Jan 20, 2025
78044da
feat(HW-903): Tokens filters and preview button
devkudasov Jan 21, 2025
dacaf96
Merge branch 'main' into feat/cross-chain
devkudasov Jan 21, 2025
6eb2508
heat(HW-903): Single chain preview screen
devkudasov Jan 22, 2025
317fb3d
feat(HW-903): Info
devkudasov Jan 22, 2025
fbbd287
feat(HW-903): Single chain send button
devkudasov Jan 22, 2025
cbd40d2
Merge branch 'main' into feat/cross-chain
devkudasov Jan 22, 2025
9b4c91f
feat(HW-901): Update amount chain screen conditions
devkudasov Jan 22, 2025
d45a888
feat(HW-901): Cross chain provider selector
devkudasov Jan 23, 2025
0ccf025
feat(HW-901): Show only alailable for swap tokens with quote
devkudasov Jan 27, 2025
1a19d47
Merge branch 'main' into feat/cross-chain
devkudasov Jan 27, 2025
af21ced
feat(HW-901): Translation
devkudasov Jan 27, 2025
eccf7cb
build
invalid-email-address Jan 27, 2025
4c522b4
fix(HW-1050): Change token id from haqq to eth
devkudasov Jan 27, 2025
601356f
fix(HW-1050): XXX20 tokens
devkudasov Jan 27, 2025
741bdbd
typos
devkudasov Jan 28, 2025
b27d916
feat(HW-903): Fix UI issues and update transaction store clear function
devkudasov Jan 28, 2025
f4f331b
feat(HW-898): Changelly quote
devkudasov Jan 28, 2025
758d05f
feat(HW-904): Move fee calculations into transaction.store
devkudasov Jan 29, 2025
7077764
feat(HW-904): Fee estimation and settings refactoring
devkudasov Feb 4, 2025
444e310
feat(HW-903): Single chain transafer
devkudasov Feb 5, 2025
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
2 changes: 1 addition & 1 deletion .last-build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e932aa06dae0e03488468a2b16e32aefc545a2b1
fc88bd6e44892363c6733e5c38489c4335b0bb93
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ android {
applicationId "com.haqq.wallet"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 735
versionCode 736
versionName project.env.get("APP_VERSION")
missingDimensionStrategy 'react-native-camera', 'general'
manifestPlaceholders = [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion assets/locales/en/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"StakingInfoUnDelegationDay": " ({{day}} day left)",
"StakingInfoUnDelegationDays": " ({{days}} days left)",
"Welcome_haqq_pin": "Welcome to HAQQ Wallet",
"_hash": "b526e233768a8f01d7dc6874a4b8ac439ec30995d3b710fe91f2138553a15a68",
"_hash": "eb5af911058fecdc73ac1f648770eb5d9b92850a2ee39766383ef63731466b25",
"accept": "Accept",
"accountInfoNftTabTitle": "NFTs",
"accountInfoTokensTabTitle": "Tokens",
Expand Down Expand Up @@ -543,6 +543,7 @@
"raffleRewardСongratulations": "Congratulations!",
"raffleRewardСongratulations": "Сongratulations!",
"raffleTicketRecieved": "You have successfully claimed your reward",
"rateInfo": "Rate {{token}} ≈ {{fiat}}",
"recent": "Recent",
"recoveryPinButton": "Recovery",
"recoveryPinDescription": "If you encounter issues changing the PIN or get an \"Incorrect password\" error, you can restore wallet access by entering the PIN you intended to change to.",
Expand Down Expand Up @@ -889,6 +890,7 @@
"tokensSortingByAvailable": "By Available",
"tokensWidgetTitle": "Tokens",
"tokensZeroBalance": " Zero Balance",
"totalAmountFrom": "Total Amount from",
"totalAvailable": "Total: {{count}}",
"totalValueAccount": "Total balance",
"totalValueScreenTitle": "Transactions",
Expand Down Expand Up @@ -1086,6 +1088,7 @@
"welcomeSocialWallet": "Social login",
"welcomeTitle": "No account is connected",
"yes": "Yes",
"youSentFrom": "You Sent from",
"yourAddresses": "Your addresses",
"yourAppVersion": "Your version: {{version}}"
}
4 changes: 2 additions & 2 deletions ios/haqq.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@
CODE_SIGN_ENTITLEMENTS = haqq/haqq.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 762;
CURRENT_PROJECT_VERSION = 763;
DEVELOPMENT_TEAM = XL66G6TJJL;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = haqq/Info.plist;
Expand Down Expand Up @@ -1333,7 +1333,7 @@
CODE_SIGN_ENTITLEMENTS = haqq/haqq.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 762;
CURRENT_PROJECT_VERSION = 763;
DEVELOPMENT_TEAM = XL66G6TJJL;
INFOPLIST_FILE = haqq/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "Haqq Wallet";
Expand Down
12 changes: 12 additions & 0 deletions ios/haqq/Images.xcassets/arrow_down_tail.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images": [
{
"idiom": "universal",
"filename": "arrow_down_tail.svg"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ios/haqq/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>762</string>
<string>763</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/haqqTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>762</string>
<string>763</string>
</dict>
</plist>
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haqq",
"version": "1.10.1",
"version": "1.10.2",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down Expand Up @@ -91,6 +91,7 @@
"js-sha3": "0.8.0",
"json-rpc-engine": "6.1.0",
"json-stable-stringify": "1.0.2",
"lodash.debounce": "^4.0.8",
"lottie-react-native": "7.0.0",
"markdown-it": "13.0.1",
"mobx": "6.12.0",
Expand Down Expand Up @@ -190,6 +191,7 @@
"@types/bn.js": "5.1.1",
"@types/create-hash": "1.2.2",
"@types/jest": "29.5.5",
"@types/lodash.debounce": "^4.0.9",
"@types/metro-config": "0.76.3",
"@types/pbkdf2": "3.1.0",
"@types/pump": "1.1.1",
Expand Down
3 changes: 2 additions & 1 deletion src/components/account-info/account-info-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
First,
Icon,
IconButton,
IconsName,
Inline,
Spacer,
Text,
Expand Down Expand Up @@ -113,7 +114,7 @@ export const AccountInfoHeader = ({
disabled={wallet.type === WalletType.watchOnly}
onPress={onSend}
style={styles.iconButton}>
<Icon i24 name="arrow_send" color={Color.textBase1} />
<Icon i24 name={IconsName.arrow_send} color={Color.textBase1} />
<Text variant={TextVariant.t14} i18n={I18N.walletCardSend} />
</IconButton>
<IconButton onPress={onReceive} style={styles.iconButton}>
Expand Down
64 changes: 64 additions & 0 deletions src/components/address-highlight.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import {useCallback, useMemo} from 'react';

import Clipboard from '@react-native-clipboard/clipboard';
import {ViewStyle} from 'react-native';

import {Color} from '@app/colors';
import {createTheme} from '@app/helpers';
import {I18N} from '@app/i18n';
import {sendNotification} from '@app/services';
import {splitAddress} from '@app/utils';

import {DataContent, DataContentProps, Text, TextPosition} from './ui';

type AddressHighlightProps = DataContentProps & {
address: string;
title: I18N;
centered?: boolean;
};

export const AddressHighlight = ({
address,
title,
centered,
...dataContentProps
}: AddressHighlightProps) => {
const splitted = useMemo(() => splitAddress(address), [address]);

const onPressAddress = useCallback(() => {
Clipboard.setString(address);
sendNotification(I18N.notificationCopied);
}, [address]);

const titlePosition: TextPosition = useMemo(
() => (centered ? TextPosition.center : TextPosition.left),
[centered],
);
const subTitlePosition = useMemo(
() => (centered ? {alignItems: 'center'} : {alignItems: 'flex-start'}),
[centered],
);

return (
<DataContent
{...dataContentProps}
title={
<Text position={titlePosition}>
<Text>{splitted[0]}</Text>
<Text color={Color.textBase2}>{splitted[1]}</Text>
<Text>{splitted[2]}</Text>
</Text>
}
numberOfLines={2}
subtitleI18n={title}
reversed
short
onPress={onPressAddress}
style={{...styles.container, ...subTitlePosition} as ViewStyle}
/>
);
};

const styles = createTheme({
container: {flex: 0},
});
4 changes: 2 additions & 2 deletions src/components/address-row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {Color} from '@app/colors';
import {createTheme} from '@app/helpers';
import {shortAddress} from '@app/helpers/short-address';

import {Box, DataContent, Text} from './ui';
import {Box, DataContent, Text, TextVariant} from './ui';

import {Contact} from '../models/contact';

Expand All @@ -22,7 +22,7 @@ export const AddressRow = ({item, onPress}: AddressRowProps) => {
}}>
<View style={page.container}>
<Box style={page.badge}>
<Text t13 color={Color.textBase2}>
<Text variant={TextVariant.t13} color={Color.textBase2}>
{item.name.slice(0, 1)}
</Text>
</Box>
Expand Down
56 changes: 56 additions & 0 deletions src/components/chip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import {PropsWithChildren} from 'react';

import {TouchableOpacity, View} from 'react-native';

import {Color} from '@app/colors';
import {createTheme} from '@app/helpers';

import {Spacer, Text, TextVariant} from './ui';

type ChipProps = {
title: string;
subtitle?: string;
};

export const Chip = ({
title,
subtitle,
children,
}: PropsWithChildren<ChipProps>) => {
return (
<TouchableOpacity>
<View style={styles.container}>
<Text variant={TextVariant.t13} color={Color.textGreen1}>
{title}
</Text>
{subtitle && (
<>
<Spacer width={4} />
<Text variant={TextVariant.t13} color={Color.textGreen1}>
{subtitle}
</Text>
</>
)}
{children && (
<>
<Spacer width={4} />
{children}
</>
)}
</View>
</TouchableOpacity>
);
};

const styles = createTheme({
container: {
flexDirection: 'row',
alignItems: 'center',
borderColor: Color.textGreen1,
borderWidth: 1,
borderRadius: 100,
paddingHorizontal: 16,
paddingVertical: 8,
backgroundColor: Color.bg1,
},
});
4 changes: 4 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
export * from './popup-header';

export * from './address-highlight';
export * from './chip';
export * from './token-icon';
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {ProviderModel} from '@app/models/provider';
import {Token} from '@app/models/tokens';
import {Balance} from '@app/services/balance';
import {
AddressWallet,
ChainId,
IToken,
JsonRpcMetadata,
Expand Down Expand Up @@ -156,7 +157,7 @@ export const JsonRpcCommonTransaction = ({
}, [provider, parsedInput, delegatorAddress]);

useEffectAsync(async () => {
const contract = await Contract.getById(tx?.to!, chainId);
const contract = await Contract.getById(tx?.to! as AddressWallet, chainId);
const t = contract ?? Token.UNKNOWN_TOKEN;
setToken(t as unknown as IToken);
}, [tx, chainId]);
Expand Down
32 changes: 19 additions & 13 deletions src/components/json-rpc-sign/json-rpc-transaction-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import {useEffectAsync} from '@app/hooks/use-effect-async';
import {EstimationVariant, Fee} from '@app/models/fee';
import {Provider} from '@app/models/provider';
import {WalletModel} from '@app/models/wallet';
import {JsonRpcSignPopupStackParamList} from '@app/route-types';
import {
JsonRpcSignPopupStackParamList,
TransactionStackRoutes,
} from '@app/route-types';
import {EthNetwork} from '@app/services';
import {Balance} from '@app/services/balance';
import {
Expand Down Expand Up @@ -150,18 +153,21 @@ export const JsonRpcTransactionInfo = observer(
}

if (fee) {
const result = await awaitForFee({
fee,
from: tx.from! || wallet.address,
to: tx.to!,
value: new Balance(
tx.value! || '0x0',
provider?.decimals,
provider?.denom,
),
data: tx.data,
chainId: provider?.ethChainId ? provider.ethChainId : undefined,
});
const result = await awaitForFee(
{
fee,
from: tx.from! || wallet.address,
to: tx.to!,
value: new Balance(
tx.value! || '0x0',
provider?.decimals,
provider?.denom,
),
data: tx.data,
chainId: provider?.ethChainId ? provider.ethChainId : undefined,
},
TransactionStackRoutes.TransactionFeeSettings,
);
setFee(result);
}
}, [navigation, tx, fee, provider, wallet]);
Expand Down
10 changes: 2 additions & 8 deletions src/components/modals/copy-address-bottom-sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ import {shortAddress} from '@app/helpers/short-address';
import {I18N} from '@app/i18n';
import {Provider} from '@app/models/provider';
import {sendNotification} from '@app/services';
import {
AddressCosmosHaqq,
AddressEthereum,
AddressTron,
ModalType,
Modals,
} from '@app/types';
import {AddressWallet, ModalType, Modals} from '@app/types';
import {ETH_CHAIN_ID, MAINNET_ETH_CHAIN_ID} from '@app/variables/common';

import {ImageWrapper} from '../image-wrapper';

type AddressItem = {
address: AddressCosmosHaqq | AddressEthereum | AddressTron;
address: AddressWallet;
icon: string;
providerName: string;
};
Expand Down
Loading
Loading