-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/stake-884-add-more-mobile-pooled-stakin…
…g-events
- Loading branch information
Showing
40 changed files
with
646 additions
and
102 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
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
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
15 changes: 15 additions & 0 deletions
15
...s/Views/confirmations/components/Confirm/Info/Shared/InfoRowOrigin/InfoRowOrigin.test.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,15 @@ | ||
import React from 'react'; | ||
|
||
import renderWithProvider from '../../../../../../../../util/test/renderWithProvider'; | ||
import { typedSignV1ConfirmationState } from '../../../../../../../../util/test/confirm-data-helpers'; | ||
import InfoRowOrigin from './InfoRowOrigin'; | ||
|
||
describe('InfoRowOrigin', () => { | ||
it('should contained required text', async () => { | ||
const { getByText } = renderWithProvider(<InfoRowOrigin />, { | ||
state: typedSignV1ConfirmationState, | ||
}); | ||
expect(getByText('Request from')).toBeDefined(); | ||
expect(getByText('metamask.github.io')).toBeDefined(); | ||
}); | ||
}); |
28 changes: 28 additions & 0 deletions
28
...onents/Views/confirmations/components/Confirm/Info/Shared/InfoRowOrigin/InfoRowOrigin.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,28 @@ | ||
import React from 'react'; | ||
|
||
import { strings } from '../../../../../../../../../locales/i18n'; | ||
import useApprovalRequest from '../../../../../hooks/useApprovalRequest'; | ||
import InfoSection from '../../../../UI/InfoRow/InfoSection'; | ||
import InfoRow from '../../../../UI/InfoRow'; | ||
import DisplayURL from '../../../../UI/InfoRow/InfoValue/DisplayURL'; | ||
|
||
const InfoRowOrigin = () => { | ||
const { approvalRequest } = useApprovalRequest(); | ||
|
||
if (!approvalRequest) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<InfoSection> | ||
<InfoRow | ||
label={strings('confirm.request_from')} | ||
tooltip={strings('confirm.personal_sign_tooltip')} | ||
> | ||
<DisplayURL url={approvalRequest.origin} /> | ||
</InfoRow> | ||
</InfoSection> | ||
); | ||
}; | ||
|
||
export default InfoRowOrigin; |
1 change: 1 addition & 0 deletions
1
app/components/Views/confirmations/components/Confirm/Info/Shared/InfoRowOrigin/index.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 @@ | ||
export { default } from './InfoRowOrigin'; |
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.