Skip to content

Commit

Permalink
Fix/wallet address (#126)
Browse files Browse the repository at this point in the history
* fix: compare lower case addresses

* fix: removed unused code

* chore: changed app version
  • Loading branch information
ignaciosantise authored Feb 2, 2024
1 parent 0ac4f0d commit 9519c51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion wallets/rn_cli_wallet/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ android {
applicationId "com.walletconnect.web3wallet.rnsample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 6
versionCode 7
versionName "1.0"
}
signingConfigs {
Expand Down
12 changes: 10 additions & 2 deletions wallets/rn_cli_wallet/ios/RNWeb3Wallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = W5R8AG9K22;
ENABLE_BITCODE = NO;
HEADER_SEARCH_PATHS = (
Expand Down Expand Up @@ -584,8 +584,12 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.walletconnect.web3wallet.rnsample;
PRODUCT_NAME = RNWeb3Wallet;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
Expand All @@ -596,7 +600,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 6;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = W5R8AG9K22;
HEADER_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -661,7 +665,11 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.walletconnect.web3wallet.rnsample;
PRODUCT_NAME = RNWeb3Wallet;
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
SUPPORTS_MACCATALYST = NO;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = 1;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
Expand Down
11 changes: 2 additions & 9 deletions wallets/rn_cli_wallet/src/utils/HelperUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,11 @@ export function getSignTypedDataParamsData(params: string[]) {
export function getWalletAddressFromParams(addresses: string[], params: any) {
const paramsString = JSON.stringify(params);
let address = '';

addresses.forEach(addr => {
if (paramsString.includes(addr.toLowerCase())) {
if (paramsString.toLowerCase().includes(addr.toLowerCase())) {
address = addr;
}
});

return address;
}

Expand Down Expand Up @@ -100,10 +98,5 @@ export function isSolanaChain(chain: string) {
* Formats chainId to its name
*/
export function formatChainName(chainId: string) {
return (
EIP155_CHAINS[chainId as TEIP155Chain]?.name ??
COSMOS_MAINNET_CHAINS[chainId as TCosmosChain]?.name ??
SOLANA_CHAINS[chainId as TSolanaChain]?.name ??
chainId
);
return EIP155_CHAINS[chainId as TEIP155Chain]?.name ?? chainId;
}

0 comments on commit 9519c51

Please sign in to comment.