fix(useragent): unsafe, but working implementation of ml-dsa
This commit is contained in:
@@ -10,9 +10,7 @@ Future<List<GrantEntry>> listEvmGrants(Connection connection) async {
|
||||
UserAgentRequest(evm: ua_evm.Request(grantList: request)),
|
||||
);
|
||||
if (!response.hasEvm()) {
|
||||
throw Exception(
|
||||
'Expected EVM response, got ${response.whichPayload()}',
|
||||
);
|
||||
throw Exception('Expected EVM response, got ${response.whichPayload()}');
|
||||
}
|
||||
|
||||
final evmResponse = response.evm;
|
||||
@@ -50,9 +48,7 @@ Future<int> createEvmGrant(
|
||||
final resp = await connection.ask(request);
|
||||
|
||||
if (!resp.hasEvm()) {
|
||||
throw Exception(
|
||||
'Expected EVM response, got ${resp.whichPayload()}',
|
||||
);
|
||||
throw Exception('Expected EVM response, got ${resp.whichPayload()}');
|
||||
}
|
||||
|
||||
final evmResponse = resp.evm;
|
||||
@@ -70,15 +66,11 @@ Future<int> createEvmGrant(
|
||||
Future<void> deleteEvmGrant(Connection connection, int grantId) async {
|
||||
final response = await connection.ask(
|
||||
UserAgentRequest(
|
||||
evm: ua_evm.Request(
|
||||
grantDelete: EvmGrantDeleteRequest(grantId: grantId),
|
||||
),
|
||||
evm: ua_evm.Request(grantDelete: EvmGrantDeleteRequest(grantId: grantId)),
|
||||
),
|
||||
);
|
||||
if (!response.hasEvm()) {
|
||||
throw Exception(
|
||||
'Expected EVM response, got ${response.whichPayload()}',
|
||||
);
|
||||
throw Exception('Expected EVM response, got ${response.whichPayload()}');
|
||||
}
|
||||
|
||||
final evmResponse = response.evm;
|
||||
|
||||
@@ -8,9 +8,7 @@ Future<Set<int>> readClientWalletAccess(
|
||||
required int clientId,
|
||||
}) async {
|
||||
final response = await connection.ask(
|
||||
UserAgentRequest(
|
||||
sdkClient: ua_sdk.Request(listWalletAccess: Empty()),
|
||||
),
|
||||
UserAgentRequest(sdkClient: ua_sdk.Request(listWalletAccess: Empty())),
|
||||
);
|
||||
if (!response.hasSdkClient()) {
|
||||
throw Exception(
|
||||
@@ -33,9 +31,7 @@ Future<List<ua_sdk.WalletAccessEntry>> listAllWalletAccesses(
|
||||
Connection connection,
|
||||
) async {
|
||||
final response = await connection.ask(
|
||||
UserAgentRequest(
|
||||
sdkClient: ua_sdk.Request(listWalletAccess: Empty()),
|
||||
),
|
||||
UserAgentRequest(sdkClient: ua_sdk.Request(listWalletAccess: Empty())),
|
||||
);
|
||||
if (!response.hasSdkClient()) {
|
||||
throw Exception(
|
||||
@@ -81,9 +77,7 @@ Future<void> writeClientWalletAccess(
|
||||
UserAgentRequest(
|
||||
sdkClient: ua_sdk.Request(
|
||||
revokeWalletAccess: ua_sdk.RevokeWalletAccess(
|
||||
accesses: [
|
||||
for (final walletId in toRevoke) walletId,
|
||||
],
|
||||
accesses: [for (final walletId in toRevoke) walletId],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user