Skip to content

Commit

Permalink
Merge pull request #440 from polkawallet-io/develop
Browse files Browse the repository at this point in the history
DApp browser update
  • Loading branch information
RomeroYang authored Jan 12, 2024
2 parents 8af0c1c + 0b8746c commit 3283a16
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 22 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# [3.6.0-beta]
20240112
1. update DApp browser.
2. bridge add statemint support.

# [3.5.9-beta]
20231229
1. update acala/karura plugin to fix ios crash.
Expand Down
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3591;
CURRENT_PROJECT_VERSION = 3601;
DEVELOPMENT_TEAM = WQ5H736A22;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = armv7;
Expand All @@ -371,7 +371,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.5.9;
MARKETING_VERSION = 3.6.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.polkawallet.polkawallet;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -500,7 +500,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3591;
CURRENT_PROJECT_VERSION = 3601;
DEVELOPMENT_TEAM = WQ5H736A22;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = armv7;
Expand All @@ -519,7 +519,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.5.9;
MARKETING_VERSION = 3.6.0;
PRODUCT_BUNDLE_IDENTIFIER = io.polkawallet.polkawallet;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -541,7 +541,7 @@
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3591;
CURRENT_PROJECT_VERSION = 3601;
DEVELOPMENT_TEAM = WQ5H736A22;
ENABLE_BITCODE = NO;
EXCLUDED_ARCHS = armv7;
Expand All @@ -560,7 +560,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 3.5.9;
MARKETING_VERSION = 3.6.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = io.polkawallet.polkawallet;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion lib/common/consts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const bridge_account = {
'acala': '13YMK2eYoAvStnzReuxBjMrAvPXmmdsURwZvc62PrdXimbNy'
};

const bridge_sdk_version = 35701;
const bridge_sdk_version = 36001;

const show_guide_status_key = 'show_guide_status';

Expand Down
17 changes: 9 additions & 8 deletions lib/pages/browser/browserSearch.dart
Original file line number Diff line number Diff line change
Expand Up @@ -63,23 +63,24 @@ class SearchBarDelegate extends SearchDelegate<String> {

@override
Widget buildResults(BuildContext context) {
BrowserApi.addDappSearchHistory(service, query);
final input = query.trim();
BrowserApi.addDappSearchHistory(service, input);
var dapps = service.store.settings.dapps;
if (query.trim().isNotEmpty) {
if (input.isNotEmpty) {
List<dynamic> _dapps = [];
dapps.forEach((element) {
if (element['name'].contains(query)) {
element['nameIndex'] = element['name'].indexOf(query);
if (element['name'].contains(input)) {
element['nameIndex'] = element['name'].indexOf(input);
_dapps.add(element);
} else if (element['detailUrl'].contains(query)) {
element['detailIndex'] = element['detailUrl'].indexOf(query);
} else if (element['detailUrl'].contains(input)) {
element['detailIndex'] = element['detailUrl'].indexOf(input);
_dapps.add(element);
}
});
dapps = _dapps;
}
if (dapps.length == 0 && query.trim().length > 0) {
final url = query.startsWith("http") ? query : "https://$query";
if (dapps.isEmpty && input.isNotEmpty) {
final url = input.startsWith("http") ? input : "https://$input";
Future.delayed(Duration.zero, () {
BrowserApi.openBrowser(context, {"detailUrl": url}, service);
});
Expand Down
5 changes: 2 additions & 3 deletions lib/service/walletApi.dart
Original file line number Diff line number Diff line change
Expand Up @@ -336,9 +336,8 @@ class WalletApi {
}

static Future<Map> getEthConfig() async {
//TODO:
// const url = '$_configEndpoint/config/ethConfig.json';
const url = '$_endpoint/devConfiguration/config/ethConfig.json'; //dev
const url = '$_configEndpoint/config/ethConfig.json';
// const url = '$_endpoint/devConfiguration/config/ethConfig.json'; //dev
try {
final res = await get(Uri.parse(url)).timeout(const Duration(seconds: 3));
return jsonDecode(utf8.decode(res.bodyBytes));
Expand Down
4 changes: 2 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1100,10 +1100,10 @@ packages:
dependency: "direct main"
description:
name: polkawallet_sdk
sha256: "59c0fb0314d0bce37cbab2b3e4fd23d840bc8428732982f442930dc60f3060d1"
sha256: "1f6ff555636a7d0c29f5d5e9eeac29df340a201d67c4fc391c455feb67f7b928"
url: "https://pub.dev"
source: hosted
version: "0.5.8+1"
version: "0.5.8+4"
polkawallet_ui:
dependency: "direct main"
description:
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 3.5.9+3591
version: 3.6.0+3601

environment:
sdk: ">=2.10.0 <3.0.0"
Expand Down Expand Up @@ -112,7 +112,7 @@ dependency_overrides:
# polkawallet_plugin_evm:
# path: ../../coding/polkawallet/polkawallet_plugin_evm
polkawallet_ui: ^0.5.5+1
polkawallet_sdk: ^0.5.8+1
polkawallet_sdk: ^0.5.8+4
# polkawallet_ui:
# path: ../../coding/polkawallet/ui
# polkawallet_sdk:
Expand Down

0 comments on commit 3283a16

Please sign in to comment.