Skip to content

Commit

Permalink
fix(app): Fix the compile error for JS Binding
Browse files Browse the repository at this point in the history
Signed-off-by: Talwinder kaur <[email protected]>
  • Loading branch information
Talwinder kaur committed Nov 21, 2023
1 parent b592636 commit c7919b8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions demo/app/lib/wallet_sdk/wallet_sdk_js.dart
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ external dynamic jsVerifyCredentialsStatus(String credential);
external dynamic jsWellKnownDidConfig(String issuerID);

@JS()
external dynamic jsGetIssuerMetadata();
external dynamic jsGetIssuerMetadata(List<String> credentialTypes);

class WalletSDK extends WalletPlatform {
@visibleForTesting
Expand Down Expand Up @@ -378,14 +378,18 @@ class WalletSDK extends WalletPlatform {
return versionDetailResp;
}

Future<List<Object?>> getCustomScope() async {
return await methodChannel.invokeMethod('getCustomScope');
}

Future<WellKnownDidConfig> wellKnownDidConfig(String issuerID) async {
final JSWellKnownDIDConfig jsConfig = await promiseToFuture(jsWellKnownDidConfig(issuerID));

return WellKnownDidConfig(isValid: jsConfig.isValid, serviceURL: jsConfig.serviceURL);
}

Future<List<IssuerMetaData>> getIssuerMetaData() async {
final JSIssuerMetadata data = await promiseToFuture(jsGetIssuerMetadata());
Future<List<IssuerMetaData>> getIssuerMetaData(List<String> credentialTypes) async {
final JSIssuerMetadata data = await promiseToFuture(jsGetIssuerMetadata(credentialTypes));

final supportedCredentials = data.supportedCredentials
.map((e) => e as JSSupportedCredentials)
Expand Down Expand Up @@ -433,7 +437,7 @@ class WalletSDK extends WalletPlatform {
return VerifierDisplayData(name: data.name, did: data.did, logoURI: data.logoURI, purpose: data.purpose);
}

Future<void> presentCredential({required List<String> selectedCredentials}) async {
Future<void> presentCredential({required List<String> selectedCredentials, Map<String, dynamic>? customScopeList}) async {
await promiseToFuture(jsPresentCredential(selectedCredentials));
}

Expand Down

0 comments on commit c7919b8

Please sign in to comment.