-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix gui wallet recover walllet scan waiting
- make the gui wallet not block on scanning the blokchain when recovering a wallet from a seed phrase
- Loading branch information
Showing
9 changed files
with
85 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// Copyright (c) 2025 RBB S.r.l | ||
// [email protected] | ||
// SPDX-License-Identifier: MIT | ||
// Licensed under the MIT License; | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://github.com/mintlayer/mintlayer-core/blob/master/LICENSE | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
pub enum ScanBlockchain { | ||
/// Skips the scanning of the blokchain, used when creating a wallet from a brand new seed | ||
/// phrase never used before | ||
SkipScanning, | ||
/// Scans the blokchain and waits for the scanning to complete before returning | ||
ScanAndWait, | ||
/// Scans the blokchain in the background | ||
ScanNoWait, | ||
} | ||
|
||
impl ScanBlockchain { | ||
pub fn skip_syncing(&self) -> bool { | ||
match self { | ||
Self::SkipScanning => true, | ||
Self::ScanNoWait | Self::ScanAndWait => false, | ||
} | ||
} | ||
|
||
pub fn wait_for_sync(&self) -> bool { | ||
match self { | ||
Self::ScanAndWait => true, | ||
Self::SkipScanning | Self::ScanNoWait => false, | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters