Skip to content

Commit

Permalink
refactor: removed deprecated LockWallet and UnLockWallet from WalletS…
Browse files Browse the repository at this point in the history
…ervice (#1343)
  • Loading branch information
ansh-devs authored Jun 13, 2024
1 parent 268fd72 commit 868a948
Show file tree
Hide file tree
Showing 36 changed files with 678 additions and 6,473 deletions.
6 changes: 0 additions & 6 deletions www/grpc/buf/grpc-gateway.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ http:
- selector: pactus.Wallet.UnloadWallet
get: "/pactus/wallet/unload_wallet"

- selector: pactus.Wallet.LockWallet
get: "/pactus/wallet/lock_wallet"

- selector: pactus.Wallet.UnlockWallet
get: "/pactus/wallet/unlock_wallet"

- selector: pactus.Wallet.SignRawTransaction
get: "/pactus/wallet/sign_raw_transaction"

Expand Down
224 changes: 0 additions & 224 deletions www/grpc/gen/dart/wallet.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -865,100 +865,6 @@ class UnloadWalletResponse extends $pb.GeneratedMessage {
void clearWalletName() => clearField(1);
}

class LockWalletRequest extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LockWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName')
..hasRequiredFields = false
;

LockWalletRequest._() : super();
factory LockWalletRequest({
$core.String? walletName,
}) {
final _result = create();
if (walletName != null) {
_result.walletName = walletName;
}
return _result;
}
factory LockWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory LockWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
LockWalletRequest clone() => LockWalletRequest()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
LockWalletRequest copyWith(void Function(LockWalletRequest) updates) => super.copyWith((message) => updates(message as LockWalletRequest)) as LockWalletRequest; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static LockWalletRequest create() => LockWalletRequest._();
LockWalletRequest createEmptyInstance() => create();
static $pb.PbList<LockWalletRequest> createRepeated() => $pb.PbList<LockWalletRequest>();
@$core.pragma('dart2js:noInline')
static LockWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<LockWalletRequest>(create);
static LockWalletRequest? _defaultInstance;

@$pb.TagNumber(1)
$core.String get walletName => $_getSZ(0);
@$pb.TagNumber(1)
set walletName($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasWalletName() => $_has(0);
@$pb.TagNumber(1)
void clearWalletName() => clearField(1);
}

class LockWalletResponse extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'LockWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName')
..hasRequiredFields = false
;

LockWalletResponse._() : super();
factory LockWalletResponse({
$core.String? walletName,
}) {
final _result = create();
if (walletName != null) {
_result.walletName = walletName;
}
return _result;
}
factory LockWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory LockWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
LockWalletResponse clone() => LockWalletResponse()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
LockWalletResponse copyWith(void Function(LockWalletResponse) updates) => super.copyWith((message) => updates(message as LockWalletResponse)) as LockWalletResponse; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static LockWalletResponse create() => LockWalletResponse._();
LockWalletResponse createEmptyInstance() => create();
static $pb.PbList<LockWalletResponse> createRepeated() => $pb.PbList<LockWalletResponse>();
@$core.pragma('dart2js:noInline')
static LockWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<LockWalletResponse>(create);
static LockWalletResponse? _defaultInstance;

@$pb.TagNumber(1)
$core.String get walletName => $_getSZ(0);
@$pb.TagNumber(1)
set walletName($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasWalletName() => $_has(0);
@$pb.TagNumber(1)
void clearWalletName() => clearField(1);
}

class GetValidatorAddressRequest extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'GetValidatorAddressRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'publicKey')
Expand Down Expand Up @@ -1053,128 +959,6 @@ class GetValidatorAddressResponse extends $pb.GeneratedMessage {
void clearAddress() => clearField(1);
}

class UnlockWalletRequest extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnlockWalletRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName')
..aOS(2, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'password')
..a<$core.int>(3, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'timeout', $pb.PbFieldType.O3)
..hasRequiredFields = false
;

UnlockWalletRequest._() : super();
factory UnlockWalletRequest({
$core.String? walletName,
$core.String? password,
$core.int? timeout,
}) {
final _result = create();
if (walletName != null) {
_result.walletName = walletName;
}
if (password != null) {
_result.password = password;
}
if (timeout != null) {
_result.timeout = timeout;
}
return _result;
}
factory UnlockWalletRequest.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory UnlockWalletRequest.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
UnlockWalletRequest clone() => UnlockWalletRequest()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
UnlockWalletRequest copyWith(void Function(UnlockWalletRequest) updates) => super.copyWith((message) => updates(message as UnlockWalletRequest)) as UnlockWalletRequest; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static UnlockWalletRequest create() => UnlockWalletRequest._();
UnlockWalletRequest createEmptyInstance() => create();
static $pb.PbList<UnlockWalletRequest> createRepeated() => $pb.PbList<UnlockWalletRequest>();
@$core.pragma('dart2js:noInline')
static UnlockWalletRequest getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UnlockWalletRequest>(create);
static UnlockWalletRequest? _defaultInstance;

@$pb.TagNumber(1)
$core.String get walletName => $_getSZ(0);
@$pb.TagNumber(1)
set walletName($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasWalletName() => $_has(0);
@$pb.TagNumber(1)
void clearWalletName() => clearField(1);

@$pb.TagNumber(2)
$core.String get password => $_getSZ(1);
@$pb.TagNumber(2)
set password($core.String v) { $_setString(1, v); }
@$pb.TagNumber(2)
$core.bool hasPassword() => $_has(1);
@$pb.TagNumber(2)
void clearPassword() => clearField(2);

@$pb.TagNumber(3)
$core.int get timeout => $_getIZ(2);
@$pb.TagNumber(3)
set timeout($core.int v) { $_setSignedInt32(2, v); }
@$pb.TagNumber(3)
$core.bool hasTimeout() => $_has(2);
@$pb.TagNumber(3)
void clearTimeout() => clearField(3);
}

class UnlockWalletResponse extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'UnlockWalletResponse', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName')
..hasRequiredFields = false
;

UnlockWalletResponse._() : super();
factory UnlockWalletResponse({
$core.String? walletName,
}) {
final _result = create();
if (walletName != null) {
_result.walletName = walletName;
}
return _result;
}
factory UnlockWalletResponse.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r);
factory UnlockWalletResponse.fromJson($core.String i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromJson(i, r);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
'Will be removed in next major version')
UnlockWalletResponse clone() => UnlockWalletResponse()..mergeFromMessage(this);
@$core.Deprecated(
'Using this can add significant overhead to your binary. '
'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
'Will be removed in next major version')
UnlockWalletResponse copyWith(void Function(UnlockWalletResponse) updates) => super.copyWith((message) => updates(message as UnlockWalletResponse)) as UnlockWalletResponse; // ignore: deprecated_member_use
$pb.BuilderInfo get info_ => _i;
@$core.pragma('dart2js:noInline')
static UnlockWalletResponse create() => UnlockWalletResponse._();
UnlockWalletResponse createEmptyInstance() => create();
static $pb.PbList<UnlockWalletResponse> createRepeated() => $pb.PbList<UnlockWalletResponse>();
@$core.pragma('dart2js:noInline')
static UnlockWalletResponse getDefault() => _defaultInstance ??= $pb.GeneratedMessage.$_defaultFor<UnlockWalletResponse>(create);
static UnlockWalletResponse? _defaultInstance;

@$pb.TagNumber(1)
$core.String get walletName => $_getSZ(0);
@$pb.TagNumber(1)
set walletName($core.String v) { $_setString(0, v); }
@$pb.TagNumber(1)
$core.bool hasWalletName() => $_has(0);
@$pb.TagNumber(1)
void clearWalletName() => clearField(1);
}

class SignRawTransactionRequest extends $pb.GeneratedMessage {
static final $pb.BuilderInfo _i = $pb.BuilderInfo(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'SignRawTransactionRequest', package: const $pb.PackageName(const $core.bool.fromEnvironment('protobuf.omit_message_names') ? '' : 'pactus'), createEmptyInstance: create)
..aOS(1, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'walletName')
Expand Down Expand Up @@ -1439,14 +1223,6 @@ class WalletApi {
var emptyResponse = UnloadWalletResponse();
return _client.invoke<UnloadWalletResponse>(ctx, 'Wallet', 'UnloadWallet', request, emptyResponse);
}
$async.Future<LockWalletResponse> lockWallet($pb.ClientContext? ctx, LockWalletRequest request) {
var emptyResponse = LockWalletResponse();
return _client.invoke<LockWalletResponse>(ctx, 'Wallet', 'LockWallet', request, emptyResponse);
}
$async.Future<UnlockWalletResponse> unlockWallet($pb.ClientContext? ctx, UnlockWalletRequest request) {
var emptyResponse = UnlockWalletResponse();
return _client.invoke<UnlockWalletResponse>(ctx, 'Wallet', 'UnlockWallet', request, emptyResponse);
}
$async.Future<GetTotalBalanceResponse> getTotalBalance($pb.ClientContext? ctx, GetTotalBalanceRequest request) {
var emptyResponse = GetTotalBalanceResponse();
return _client.invoke<GetTotalBalanceResponse>(ctx, 'Wallet', 'GetTotalBalance', request, emptyResponse);
Expand Down
Loading

0 comments on commit 868a948

Please sign in to comment.