-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixup! feat(coinmarket): possibility to proceed with unverified address
- Loading branch information
1 parent
a62919e
commit 57656fd
Showing
7 changed files
with
109 additions
and
129 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
...src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedAddressModal.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 { useCallback } from 'react'; | ||
|
||
import { openAddressModal, showAddress } from 'src/actions/wallet/receiveActions'; | ||
import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; | ||
|
||
interface ConfirmUnverifiedAddressModalProps { | ||
addressPath: string; | ||
value: string; | ||
} | ||
|
||
export const ConfirmUnverifiedAddressModal = ({ | ||
addressPath, | ||
value, | ||
}: ConfirmUnverifiedAddressModalProps) => { | ||
const verifyProcess = useCallback(() => showAddress(addressPath, value), [addressPath, value]); | ||
const showUnverifiedAddress = () => openAddressModal({ addressPath, value }); | ||
|
||
return ( | ||
<ConfirmUnverifiedModal | ||
action={{ | ||
event: showUnverifiedAddress, | ||
title: 'TR_SHOW_UNVERIFIED_ADDRESS', | ||
}} | ||
verifyProcess={verifyProcess} | ||
warningText="TR_ADDRESS_PHISHING_WARNING" | ||
/> | ||
); | ||
}; |
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
106 changes: 0 additions & 106 deletions
106
...c/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedModalContainer.tsx
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
...src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedProceedModal.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,27 @@ | ||
import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; | ||
import { COINMARKET_BUY } from 'src/actions/wallet/constants'; | ||
import { Dispatch } from 'src/types/suite'; | ||
|
||
interface ConfirmUnverifiedProceedModalProps { | ||
value: string; | ||
} | ||
|
||
export const ConfirmUnverifiedProceedModal = ({ value }: ConfirmUnverifiedProceedModalProps) => { | ||
const proceedWithUnverifiedAddress = () => (dispatch: Dispatch) => { | ||
dispatch({ | ||
type: COINMARKET_BUY.VERIFY_ADDRESS, | ||
addressVerified: value, | ||
}); | ||
}; | ||
|
||
return ( | ||
<ConfirmUnverifiedModal | ||
action={{ | ||
event: proceedWithUnverifiedAddress, | ||
title: 'TR_PROCEED_UNVERIFIED_ADDRESS', | ||
closeAfterEventTriggered: true, | ||
}} | ||
warningText="TR_ADDRESS_PHISHING_WARNING" | ||
/> | ||
); | ||
}; |
20 changes: 20 additions & 0 deletions
20
...te/src/components/suite/modals/ReduxModal/UserContextModal/ConfirmUnverifiedXpubModal.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,20 @@ | ||
import { useCallback } from 'react'; | ||
|
||
import { ConfirmUnverifiedModal } from './ConfirmUnverifiedModal'; | ||
import { openXpubModal, showXpub } from 'src/actions/wallet/publicKeyActions'; | ||
|
||
export const ConfirmUnverifiedXpubModal = () => { | ||
const event = useCallback(() => openXpubModal(), []); | ||
const verifyProcess = useCallback(() => showXpub(), []); | ||
|
||
return ( | ||
<ConfirmUnverifiedModal | ||
action={{ | ||
event, | ||
title: 'TR_SHOW_UNVERIFIED_XPUB', | ||
}} | ||
verifyProcess={verifyProcess} | ||
warningText="TR_XPUB_PHISHING_WARNING" | ||
/> | ||
); | ||
}; |
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