Skip to content

Commit

Permalink
feat: enable secret recovery request review.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdethier committed May 22, 2024
1 parent 874b6a3 commit 7504c82
Show file tree
Hide file tree
Showing 16 changed files with 300 additions and 347 deletions.
4 changes: 0 additions & 4 deletions src/common/AccountInfo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { UserIdentity as IdentityType, PostalAddress as PostalAddressType } from
import { render } from "../tests";
import { DEFAULT_IDENTITY, COLOR_THEME, DEFAULT_ADDRESS } from "./TestData";
import AccountInfo from "./AccountInfo";
import { TEST_WALLET_USER } from "../wallet-user/TestData";

const DIFFERENT_IDENTITY: IdentityType = {
firstName: "John2",
Expand All @@ -24,7 +23,6 @@ test("renders without comparison", () => {
const tree = render(
<AccountInfo
label="some label"
address={ TEST_WALLET_USER.address }
identity={ DEFAULT_IDENTITY }
postalAddress={ DEFAULT_ADDRESS }
colors={ COLOR_THEME.dashboard }
Expand All @@ -39,7 +37,6 @@ test("renders and compares with same data", () => {
const tree = render(
<AccountInfo
label="some label"
address={ TEST_WALLET_USER.address }
identity={ DEFAULT_IDENTITY }
otherIdentity={ DEFAULT_IDENTITY }
postalAddress={ DEFAULT_ADDRESS }
Expand All @@ -56,7 +53,6 @@ test("renders and compares with different data", () => {
const tree = render(
<AccountInfo
label="some label"
address={ TEST_WALLET_USER.address }
identity={ DEFAULT_IDENTITY }
otherIdentity={ DIFFERENT_IDENTITY }
postalAddress={ DEFAULT_ADDRESS }
Expand Down
11 changes: 0 additions & 11 deletions src/common/AccountInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ import { UserIdentity as IdentityType, PostalAddress as PostalAddressType } from
import Identity from "./Identity";
import PostalAddress from "./PostalAddress";
import './AccountInfo.css';
import ComparableField from "./ComparableField";
import { BackgroundAndForegroundColors } from "./ColorTheme";

export interface Props {
label: string
address: string
identity?: IdentityType
postalAddress?: PostalAddressType
otherIdentity?: IdentityType
Expand All @@ -21,15 +19,6 @@ export interface Props {
export default function AccountInfo(props: Props) {
return (
<div className="AccountInfo">
<ComparableField
id="accountAddress"
label={ props.label }
data={ props }
field={ props => props.address }
colors={ props.colors }
squeeze={ props.squeeze }
noComparison={ true }
/>
<Identity
identity={ props.identity }
otherIdentity={ props.otherIdentity }
Expand Down
8 changes: 0 additions & 8 deletions src/common/Spacer.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
.Spacer {
margin-left: -15px;
position: absolute;
horiz-align: center;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);

width: 100%;
justify-content: center;
align-items: center;

display: -ms-flexbox;
display: -webkit-flex;
display: flex;

-webkit-align-items: center;
-webkit-box-align: center;
}

129 changes: 0 additions & 129 deletions src/common/__snapshots__/AccountInfo.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,49 +4,6 @@ exports[`renders and compares with different data 1`] = `
<div
className="AccountInfo"
>
<div
className="ComparableField"
>
<div
className="FormGroup"
style={
Object {
"backgroundColor": "#eff3fe",
}
}
>
<style>
.FormGroup .form-control,
.FormGroup .form-control[readonly],
.FormGroup .input-group .btn-primary {
color: #000000;
}
</style>
<div
data-testid="accountAddressGroup"
>
<label
className="form-label"
htmlFor="accountAddress"
>
some label
</label>
<input
className="form-control"
data-testid="accountAddress"
id="accountAddress"
name="accountAddress"
onBlur={[Function]}
onChange={[Function]}
readOnly={true}
type="text"
value="vQxHAE33LeJYV69GCB4o4YcCgnDu8y99u5hy2751fRdxjX9kz"
/>
</div>
</div>
</div>
<div
className="Identity"
>
Expand Down Expand Up @@ -512,49 +469,6 @@ exports[`renders and compares with same data 1`] = `
<div
className="AccountInfo"
>
<div
className="ComparableField"
>
<div
className="FormGroup"
style={
Object {
"backgroundColor": "#eff3fe",
}
}
>
<style>
.FormGroup .form-control,
.FormGroup .form-control[readonly],
.FormGroup .input-group .btn-primary {
color: #000000;
}
</style>
<div
data-testid="accountAddressGroup"
>
<label
className="form-label"
htmlFor="accountAddress"
>
some label
</label>
<input
className="form-control"
data-testid="accountAddress"
id="accountAddress"
name="accountAddress"
onBlur={[Function]}
onChange={[Function]}
readOnly={true}
type="text"
value="vQxHAE33LeJYV69GCB4o4YcCgnDu8y99u5hy2751fRdxjX9kz"
/>
</div>
</div>
</div>
<div
className="Identity"
>
Expand Down Expand Up @@ -1020,49 +934,6 @@ exports[`renders without comparison 1`] = `
<div
className="AccountInfo"
>
<div
className="ComparableField"
>
<div
className="FormGroup"
style={
Object {
"backgroundColor": "#eff3fe",
}
}
>
<style>
.FormGroup .form-control,
.FormGroup .form-control[readonly],
.FormGroup .input-group .btn-primary {
color: #000000;
}
</style>
<div
data-testid="accountAddressGroup"
>
<label
className="form-label"
htmlFor="accountAddress"
>
some label
</label>
<input
className="form-control"
data-testid="accountAddress"
id="accountAddress"
name="accountAddress"
onBlur={[Function]}
onChange={[Function]}
readOnly={true}
type="text"
value="vQxHAE33LeJYV69GCB4o4YcCgnDu8y99u5hy2751fRdxjX9kz"
/>
</div>
</div>
</div>
<div
className="Identity"
>
Expand Down
Loading

0 comments on commit 7504c82

Please sign in to comment.