Skip to content

Commit

Permalink
Bug fixes on wallets schemes
Browse files Browse the repository at this point in the history
  • Loading branch information
quetool committed Aug 27, 2024
1 parent 8e1303f commit 896c279
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion example/dapp/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class _MyHomePageState extends State<MyHomePage> {

Future<void> initialize() async {
final prefs = await SharedPreferences.getInstance();
final fromMR = prefs.getBool('_LM_from_MR') ?? false;
final fromMR = prefs.getBool('_LM_from_MR') ?? true;
_web3App = Web3App(
core: Core(
projectId: DartDefines.projectId,
Expand Down
2 changes: 1 addition & 1 deletion example/dapp/lib/pages/connect_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ConnectPageState extends State<ConnectPage> {
await _walletConnectModalService.init();

final prefs = await SharedPreferences.getInstance();
_testFromMR = prefs.getBool('_LM_from_MR') ?? false;
_testFromMR = prefs.getBool('_LM_from_MR') ?? true;

setState(() => _initialized = true);

Expand Down
8 changes: 4 additions & 4 deletions example/dapp/lib/utils/sample_wallets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ class WCSampleWallets {
'name': 'RN Wallet',
'platform': ['ios', 'android'],
'id': '123456789012345678901234567892',
'schema': 'rn-web3wallet://',
'schema': 'rn-web3wallet://wc',
'bundleId': 'com.walletconnect.web3wallet.rnsample',
'universal': 'https://lab.web3modal.com/rn_walletkit',
},
{
'name': 'RN Wallet (internal)',
'platform': ['ios', 'android'],
'id': '1234567890123456789012345678922',
'schema': 'rn-web3wallet://',
'schema': 'rn-web3wallet://wc',
'bundleId': 'com.walletconnect.web3wallet.rnsample.internal',
'universal': 'https://lab.web3modal.com/rn_walletkit',
},
{
'name': 'Kotlin Wallet',
'platform': ['android'],
'id': '123456789012345678901234567893',
'schema': 'kotlin-web3wallet://',
'schema': 'kotlin-web3wallet://wc',
'bundleId': 'com.walletconnect.sample.wallet',
'universal':
'https://web3modal-laboratory-git-chore-kotlin-assetlinks-walletconnect1.vercel.app/wallet_release',
Expand All @@ -57,7 +57,7 @@ class WCSampleWallets {
'name': 'Kotlin Wallet (Internal)',
'platform': ['android'],
'id': '123456789012345678901234567894',
'schema': 'kotlin-web3wallet://',
'schema': 'kotlin-web3wallet://wc',
'bundleId': 'com.walletconnect.sample.wallet.internal',
'universal':
'https://web3modal-laboratory-git-chore-kotlin-assetlinks-walletconnect1.vercel.app/wallet_internal',
Expand Down
5 changes: 2 additions & 3 deletions example/wallet/lib/dependencies/web3wallet_service.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:typed_data';

import 'package:flutter/material.dart';
import 'package:flutter/foundation.dart';
import 'package:get_it/get_it.dart';
import 'package:walletconnect_flutter_v2/walletconnect_flutter_v2.dart';
import 'package:walletconnect_flutter_v2_wallet/dependencies/bottom_sheet/i_bottom_sheet_service.dart';
Expand Down Expand Up @@ -56,7 +55,7 @@ class Web3WalletService extends IWeb3WalletService {
@override
Future<void> create() async {
final prefs = await SharedPreferences.getInstance();
final fromMR = prefs.getBool('_LM_from_MR') ?? false;
final fromMR = prefs.getBool('_LM_from_MR') ?? true;
// Create the web3wallet
_web3Wallet = Web3Wallet(
core: Core(
Expand Down
2 changes: 1 addition & 1 deletion example/wallet/lib/pages/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class _SettingsPageState extends State<SettingsPage> {
const SizedBox(width: 20.0),
const Text('LM from MR '),
Switch(
value: prefs.getBool('_LM_from_MR') ?? false,
value: prefs.getBool('_LM_from_MR') ?? true,
onChanged: (value) async {
await prefs.setBool('_LM_from_MR', value);
exit(0);
Expand Down

0 comments on commit 896c279

Please sign in to comment.