-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from haven-protocol-org/develop
Merge develop (Audit)
- Loading branch information
Showing
41 changed files
with
1,002 additions
and
73 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
client/public/haven_offshore4.1.0.js → client/public/haven_offshore4.2.0.js
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file renamed
BIN
+5.29 MB
client/public/haven_offshore4.1.0.wasm → client/public/haven_offshore4.2.0.wasm
Binary file not shown.
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
95 changes: 95 additions & 0 deletions
95
client/src/platforms/desktop/components/modals/confirmAuditModal.tsx
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,95 @@ | ||
import * as React from "react"; | ||
import { Modal } from "shared/components/modal"; | ||
import { HavenAppState } from "platforms/desktop/reducers/index.js"; | ||
import { connect } from "react-redux"; | ||
import { hideModal } from "shared/actions/modal"; | ||
import { AuditProcessInfo } from "shared/reducers/auditProcess"; | ||
import { confirmAudit, resetAuditProcess } from "shared/actions/audit"; | ||
import Confirm from "shared/components/confirm"; | ||
import { Container, Information, Url } from "shared/components/_transactions/exchange/styles"; | ||
|
||
interface ConfirmTxModalProps { | ||
audit: AuditProcessInfo; | ||
confirmAudit: (metaList: Array<string>) => void; | ||
resetAuditProcess: () => void; | ||
hideModal: () => void; | ||
} | ||
|
||
class AuditM extends React.Component<any, any> { | ||
state = { | ||
checked: false, | ||
loading: false, | ||
}; | ||
|
||
onAgreementChange = () => { | ||
this.setState({ | ||
checked: !this.state.checked, | ||
}); | ||
}; | ||
|
||
onCancel() { | ||
this.props.hideModal(); | ||
this.props.resetAuditProcess(); | ||
} | ||
|
||
onConfirm() { | ||
const { metaList } = this.props.audit; | ||
|
||
this.setState({ | ||
loading: true, | ||
}); | ||
setTimeout(() => { | ||
this.props.confirmAudit(metaList); | ||
}, 30000); | ||
} | ||
|
||
render() { | ||
//const { isLoading } = this.state; | ||
return ( | ||
<Modal | ||
title="Audit Confirmation" | ||
description="Please read and agree to the terms below before proceeding" | ||
leftButton="Cancel" | ||
rightButton="Confirm" | ||
disabledLeft={false} | ||
disabledRight={!this.state.checked} | ||
isLoading={this.state.loading} | ||
onCancel={() => this.onCancel()} | ||
onConfirm={() => this.onConfirm()} | ||
> | ||
<Information> | ||
<strong>Note:</strong> Your entire balance may be locked and unusable for the entirety of the ~20m unlock priority time. However, this | ||
amount will be unlocked and usable once the <strong>{this.props.audit.metaList.length} audit transactions</strong> is/are complete. | ||
To understand why this happens and how it might impact your experience, | ||
please{" "} | ||
<strong> | ||
<Url | ||
target="_blank" | ||
href="https://havenprotocol.org/knowledge/haven-transactions/" | ||
> | ||
click here. | ||
</Url> | ||
</strong> | ||
</Information> | ||
<Container> | ||
<Confirm | ||
description="I accept the ~20m Unlock Time, Details, Terms & Fees." | ||
checked={this.state.checked} | ||
onChange={this.onAgreementChange} | ||
label="" | ||
/> | ||
</Container> | ||
</Modal> | ||
); | ||
} | ||
} | ||
|
||
const mapStateToProps = (state: HavenAppState) => ({ | ||
audit: state.auditProcess | ||
}); | ||
|
||
export const AuditModal = connect(mapStateToProps, { | ||
confirmAudit, | ||
hideModal, | ||
resetAuditProcess | ||
})(AuditM); |
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
Oops, something went wrong.