Merge #951: gui(installer): clear checkbox if descriptor is changed

416dc9d2d83c3b06ce7e7f5e282a5b9251fa303d gui(installer): clear checkbox if descriptor is changed (jp1ac4)

Pull request description:

  Currently, once the box has been ticked to confirm the descriptor has been backed up, it remains ticked even if the user goes back and changes the descriptor.

  This PR will clear the checkbox if the descriptor is changed so that the user knows it needs to be backed up

ACKs for top commit:
  edouardparis:
    ACK 416dc9d2d83c3b06ce7e7f5e282a5b9251fa303d

Tree-SHA512: c8d2be242ada364fe97b0846912420ea206f03f82290dbb87ce513746b8f555f8993d906cd38d27cba513414940bd8984282fc26389608939d89fb252f4c1049
This commit is contained in:
edouardparis 2024-02-02 11:52:10 +01:00
commit 7bef08797b
No known key found for this signature in database
GPG Key ID: E65F7A089C20DC8F

View File

@ -1515,7 +1515,10 @@ impl Step for BackupDescriptor {
Command::none() Command::none()
} }
fn load_context(&mut self, ctx: &Context) { fn load_context(&mut self, ctx: &Context) {
self.descriptor = ctx.descriptor.clone(); if self.descriptor != ctx.descriptor {
self.descriptor = ctx.descriptor.clone();
self.done = false;
}
} }
fn view(&self, _hws: &HardwareWallets, progress: (usize, usize)) -> Element<Message> { fn view(&self, _hws: &HardwareWallets, progress: (usize, usize)) -> Element<Message> {
let desc = self.descriptor.as_ref().unwrap(); let desc = self.descriptor.as_ref().unwrap();