Skip to content

Commit

Permalink
Merge pull request #106 from WalletConnect/feature/email_login_stable
Browse files Browse the repository at this point in the history
Email login stable version
  • Loading branch information
quetool authored Apr 3, 2024
2 parents aa94215 + 48b2bb4 commit 5eb7950
Show file tree
Hide file tree
Showing 35 changed files with 624 additions and 450 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-android-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
with:
payload: |-
{
"text":"🤖 New *Android* build *${{ github.ref_name }}* version for *Web3Modal Flutter* was just deployed. Test at https://appdistribution.firebase.dev/i/a47ee97e86fbdfff"
"text":"🤖 New *Android* build *beta* version for *Web3Modal Flutter* was just deployed. Test at https://appdistribution.firebase.dev/i/a47ee97e86fbdfff"
}
# Clean up Flutter envs
- name: Clean up
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
env:
APP_ID: ${{ secrets.ANDROID_APP_ID }}
run: |
firebase appdistribution:distribute app-release.apk --app $APP_ID --release-notes "Web3Modal Flutter beta testing" --groups flutter-team
firebase appdistribution:distribute app-release.apk --app $APP_ID --release-notes "Web3Modal Flutter stable release" --groups "flutter-team, javascript-team, kotlin-team"
- name: Notify Channel
uses: slackapi/[email protected]
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ios-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
with:
payload: |-
{
"text":"🍎 New *iOS* build *${{ github.ref_name }}* version for *Web3Modal Flutter* was just deployed."
"text":"🍎 New *iOS* build *beta* version for *Web3Modal Flutter* was just deployed. Test at https://testflight.apple.com/join/pzF2SUVm"
}
# Clean up
- name: Clean up
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 3.2.0-beta01
## 3.2.0-beta02

- Email Login support
- Analytics API support
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
versionName=3.2.0
versionCode=42
versionCode=44
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
6 changes: 3 additions & 3 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ SPEC CHECKSUMS:
appcheck: e1ab9d4e03736f03e0401554a134d1ed502d7629
coinbase_wallet_sdk: 7ccd4e1a7940deba6ba9bd81beece999a2268c15
CoinbaseWalletSDK: ea1f37512bbc69ebe07416e3b29bf840f5cc3152
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_timezone: ffb07bdad3c6276af8dada0f11978d8a1f8a20bb
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
package_info_plus: 58f0028419748fad15bf008b270aaa8e54380b1c
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b
webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36

PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5

Expand Down
14 changes: 7 additions & 7 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
Expand Down Expand Up @@ -470,7 +470,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_BITCODE = NO;
Expand All @@ -496,7 +496,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 44;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample.RunnerTests;
Expand All @@ -514,7 +514,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 44;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample.RunnerTests;
Expand All @@ -530,7 +530,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 44;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.web3modal.flutterExample.RunnerTests;
Expand Down Expand Up @@ -655,7 +655,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_BITCODE = NO;
Expand Down Expand Up @@ -686,7 +686,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 42;
CURRENT_PROJECT_VERSION = 44;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = W5R8AG9K22;
ENABLE_BITCODE = NO;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion example/ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>42</string>
<string>44</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationQueriesSchemes</key>
Expand Down
26 changes: 13 additions & 13 deletions example/lib/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ class _MyHomePageState extends State<MyHomePage> {
_w3mService = W3MService(
projectId: DartDefines.projectId,
logLevel: LogLevel.error,
enableAnalytics: true, // Optional - null by default
enableEmail: true, // Optional - false by default
metadata: const PairingMetadata(
name: StringConstants.w3mPageTitleV3,
description: StringConstants.w3mPageTitleV3,
Expand All @@ -59,11 +57,14 @@ class _MyHomePageState extends State<MyHomePage> {
universal: 'https://web3modal.com',
),
),
enableAnalytics: true, // Optional - null by default
enableEmail: true, // Optional - false by default
// requiredNamespaces: {},
// optionalNamespaces: {},
// excludedWalletIds: {
// 'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa', // Coinbase Wallet
// 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // Metamask
// },
// includedWalletIds: {
// 'a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393', // Phantom
// 'c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96', // Metamask
// '1ae92b26df02f0abca6304df07debccd18262fdf5fe82daa81593582dac9a369', // Rainbow
// 'fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa', // Coinbase Wallet
Expand Down Expand Up @@ -114,18 +115,17 @@ class _MyHomePageState extends State<MyHomePage> {
}

void _onModalConnect(ModalConnect? event) {
debugPrint('[$runtimeType] 1 _onModalConnect ${event?.toString()}');
debugPrint('[$runtimeType] 2 _onModalConnect ${event?.session.address}');
debugPrint(
'[$runtimeType] 3 _onModalConnect ${_w3mService.session?.address}');
debugPrint('[HomePage] 1 _onModalConnect ${event?.toString()}');
debugPrint('[HomePage] 2 _onModalConnect ${event?.session.address}');
debugPrint('[HomePage] 3 _onModalConnect ${_w3mService.session?.address}');
}

void _onModalDisconnect(ModalDisconnect? event) {
debugPrint('[$runtimeType] 1 _onModalDisconnect ${event?.toString()}');
debugPrint('[HomePage] 1 _onModalDisconnect ${event?.toString()}');
}

void _onModalError(ModalError? event) {
debugPrint('[$runtimeType] modal error ${event?.toString()}');
debugPrint('[HomePage] modal error ${event?.toString()}');
// When user connected to Coinbase Wallet but Coinbase Wallet does not have a session anymore
// (for instance if user disconnected the dapp directly within Coinbase Wallet)
// Then Coinbase Wallet won't emit any event
Expand All @@ -135,15 +135,15 @@ class _MyHomePageState extends State<MyHomePage> {
}

void _onSessionExpired(SessionExpire? event) {
debugPrint('[$runtimeType] _onSessionExpired ${event?.toString()}');
debugPrint('[HomePage] _onSessionExpired ${event?.toString()}');
}

void _onSessionUpdate(SessionUpdate? event) {
debugPrint('[$runtimeType] _onSessionUpdate ${event?.toString()}');
debugPrint('[HomePage] _onSessionUpdate ${event?.toString()}');
}

void _onSessionEvent(SessionEvent? event) {
debugPrint('[$runtimeType] _onSessionEvent ${event?.toString()}');
debugPrint('[HomePage] _onSessionEvent ${event?.toString()}');
}

@override
Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver {
// Secondary Modal's text
foreground150: const Color.fromARGB(255, 233, 237, 236),
),
radiuses: Web3ModalRadiuses.circular,
radiuses: Web3ModalRadiuses.square,
);
}
4 changes: 2 additions & 2 deletions example/lib/utils/crypto/eip155.dart
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,8 @@ class EIP155 {

final oCcy = NumberFormat("#,##0.00", "en_US");
final name = results[0].toString();
final total = results[1] / BigInt.from(1000000000000000000);
final balance = results[2] / BigInt.from(1000000000000000000);
final total = results[1].first / BigInt.from(1000000000000000000);
final balance = results[2].first / BigInt.from(1000000000000000000);

return {
'name': name,
Expand Down
2 changes: 1 addition & 1 deletion example/lib/widgets/session_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class SessionWidgetState extends State<SessionWidget> {
// Get current active account
final accounts = session.getAccounts() ?? [];
try {
final currentNamespace = widget.w3mService.selectedChain!.namespace;
final currentNamespace = widget.w3mService.selectedChain?.namespace;
final chainsNamespaces = NamespaceUtils.getChainsFromAccounts(accounts);
if (chainsNamespaces.contains(currentNamespace)) {
final account = accounts.firstWhere(
Expand Down
Loading

0 comments on commit 5eb7950

Please sign in to comment.