Skip to content

Commit

Permalink
Merge pull request #8 from Web3Auth/feat/enable-gating
Browse files Browse the repository at this point in the history
Updare deps.
  • Loading branch information
chaitanyapotti authored Jul 25, 2024
2 parents 96e520a + 624e51e commit 67f0e2e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 21 deletions.
4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4'
implementation 'com.github.Web3Auth:single-factor-auth-android:0.2.0'
implementation 'org.torusresearch:fetch-node-details-java:3.3.0'
implementation 'com.github.Web3Auth:single-factor-auth-android:0.3.0'
implementation 'org.torusresearch:fetch-node-details-java:5.0.0'
implementation 'com.google.code.gson:gson:2.9.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import org.torusresearch.fetchnodedetails.types.TorusNetwork
import org.torusresearch.fetchnodedetails.types.Web3AuthNetwork

/** SingleFactorAuthFlutterPlugin */
class SingleFactorAuthFlutterPlugin : FlutterPlugin, MethodCallHandler {
Expand All @@ -41,14 +41,14 @@ class SingleFactorAuthFlutterPlugin : FlutterPlugin, MethodCallHandler {
channel.setMethodCallHandler(null)
}

private fun getNetwork(network: String): TorusNetwork {
private fun getNetwork(network: String): Web3AuthNetwork {
return when (network) {
"mainnet" -> TorusNetwork.MAINNET
"testnet" -> TorusNetwork.TESTNET
"aqua" -> TorusNetwork.AQUA
"cyan" -> TorusNetwork.CYAN
"celeste" -> TorusNetwork.CELESTE
else -> TorusNetwork.MAINNET
"mainnet" -> Web3AuthNetwork.MAINNET
"testnet" -> Web3AuthNetwork.TESTNET
"aqua" -> Web3AuthNetwork.AQUA
"cyan" -> Web3AuthNetwork.CYAN
"celeste" -> Web3AuthNetwork.CELESTE
else -> Web3AuthNetwork.MAINNET
}
}

Expand Down
10 changes: 5 additions & 5 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ PODS:
- KeychainSwift (20.0.0)
- single_factor_auth_flutter (0.0.1):
- Flutter
- SingleFactorAuth (~> 5.0.0)
- SingleFactorAuth (5.0.0):
- SingleFactorAuth (= 6.0.0)
- SingleFactorAuth (6.0.0):
- curvelib.swift (~> 1.0.1)
- Torus-fetchNodeDetails (~> 6.0.1)
- Torus-utils (~> 8.1.0)
Expand Down Expand Up @@ -49,12 +49,12 @@ SPEC CHECKSUMS:
curvelib.swift: d0746ae82bee34016c06da3567a97e493b3c979f
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
KeychainSwift: 0ce6a4d13f7228054d1a71bb1b500448fb2ab837
single_factor_auth_flutter: 32a02b25ceb8405f3cedce4b675cfb906b8cb099
SingleFactorAuth: ee61a0969705e016871d0fb1fa65dd4a22e08316
single_factor_auth_flutter: c15c7a7a225399326d38c85de60ba3e1d5c5f82a
SingleFactorAuth: 2c25b70f7faac954fc15fe8f9598f80b09ca450e
Torus-fetchNodeDetails: 6c349f47cbca36a4b3f276fe26d03c1b39b20949
Torus-utils: 3ec4dba5ea50935ab129077adef4207af5a00225
TorusSessionManager: 05a1a8f3265d0949a1a342c4ba2c52882445b614

PODFILE CHECKSUM: d5c402b2f74646de5c7f24c1231886362b49b38f

COCOAPODS: 1.14.2
COCOAPODS: 1.14.3
2 changes: 1 addition & 1 deletion example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
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
8 changes: 5 additions & 3 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ class _MyAppState extends State<MyApp> {
await _singleFactorAuthFlutterPlugin.initialize();
if (torusKey != null) {
setState(() {
_result = "Private Key : ${torusKey.privateKey}";
_result =
"Public Add : ${torusKey.publicAddress} , Private Key : ${torusKey.privateKey}";
});
}
}
Expand Down Expand Up @@ -112,7 +113,7 @@ class _MyAppState extends State<MyApp> {
height: 20,
),
ElevatedButton(
onPressed: _getKey(getAggregrateKey),
onPressed: _getKey(getKey),
child: const Text('GetTorusKey'),
),
ElevatedButton(
Expand All @@ -138,7 +139,8 @@ class _MyAppState extends State<MyApp> {
try {
final TorusKey response = await method();
setState(() {
_result = "Private Key : ${response.privateKey}";
_result =
"Public Add : ${response.publicAddress} , Private Key : ${response.privateKey}";
log(response.publicAddress);
});
} on MissingParamException catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion ios/single_factor_auth_flutter.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ A new Flutter plugin project.
s.source = { :path => '.' }
s.source_files = 'Classes/**/*'
s.dependency 'Flutter'
s.dependency 'SingleFactorAuth', '~> 5.0.0'
s.dependency 'SingleFactorAuth', '6.0.0'
s.platform = :ios, '14.0'

# Flutter.framework does not contain a i386 slice.
Expand Down

0 comments on commit 67f0e2e

Please sign in to comment.