-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
572 additions
and
23 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
30 changes: 30 additions & 0 deletions
30
...pp/wallet/overview/widgets/coldstake/revert-coldstaking/revert-coldstaking.component.html
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,30 @@ | ||
<h2 mat-dialog-title>Disable Cold Staking</h2> | ||
|
||
<mat-dialog-content> | ||
<p> | ||
Disable Cold Staking and move your funds back to your wallet from your staking device. | ||
Note that you don't need to disable Cold Staking to spend your coins. | ||
</p> | ||
<!--p> | ||
Alternatively, you can just disable Cold Staking activation. That will stop sending staked coins to your staking device. Coins already there will stay there. | ||
</p--> | ||
<p class="warning"> | ||
<mat-icon fontSet="partIcon" fontIcon="part-alert"></mat-icon> | ||
Disabling Cold Staking will create {{ utxos.txs.length }} transaction(s) and will consume <strong>{{ fee }} PART</strong> in fees. | ||
</p> | ||
</mat-dialog-content> | ||
|
||
<mat-dialog-actions fxLayoutAlign="end center"> | ||
<button mat-button mat-dialog-close> | ||
<mat-icon fontSet="partIcon" fontIcon="part-cross"></mat-icon> | ||
Cancel | ||
</button> | ||
<!--button mat-button color="warn" (click)="disableColdstaking()"> | ||
<mat-icon fontSet="partIcon" fontIcon="part-error"></mat-icon> | ||
Disable Cold Staking | ||
</button--> | ||
<button mat-raised-button color="warn" (click)="revert()" [disabled]="!fee"> | ||
<mat-icon fontSet="partIcon" fontIcon="part-refresh"></mat-icon> | ||
Disable Cold Staking | ||
</button> | ||
</mat-dialog-actions> |
3 changes: 3 additions & 0 deletions
3
...pp/wallet/overview/widgets/coldstake/revert-coldstaking/revert-coldstaking.component.scss
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,3 @@ | ||
@import "./src/assets/_config"; // import shared colors etc. | ||
|
||
@import "./src/app/modals/shared/_modal-layout.scss"; // shared layout for modals (dialog titles etc.) |
44 changes: 44 additions & 0 deletions
44
...wallet/overview/widgets/coldstake/revert-coldstaking/revert-coldstaking.component.spec.ts
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,44 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
import { MatDialogRef } from '@angular/material'; | ||
|
||
import { RpcModule } from '../../../../../core/rpc/rpc.module'; | ||
import { SharedModule } from '../../../../shared/shared.module'; | ||
import { CoreModule } from '../../../../../core/core.module' | ||
|
||
import { CoreUiModule } from '../../../../../core-ui/core-ui.module'; | ||
import { ModalsService } from '../../../../../modals/modals.service'; | ||
|
||
import { RevertColdstakingComponent } from './revert-coldstaking.component'; | ||
|
||
describe('RevertColdstakingComponent', () => { | ||
let component: RevertColdstakingComponent; | ||
let fixture: ComponentFixture<RevertColdstakingComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
imports: [ | ||
RpcModule.forRoot(), | ||
SharedModule, | ||
CoreModule.forRoot(), | ||
CoreUiModule.forRoot() | ||
], | ||
declarations: [ RevertColdstakingComponent ], | ||
providers: [{ provide: MatDialogRef}, ModalsService], | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(RevertColdstakingComponent); | ||
component = fixture.componentInstance; | ||
component.utxos = { | ||
txs: [], | ||
amount: 0 | ||
}; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.