-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
819-4 wails improvement: execute SC, refactor (#833)
* wails: rename CallSC directory * wails: add FromTo component * wails: refactor import using alias * wails: wording * wails: execute SC warnings
- Loading branch information
Showing
10 changed files
with
156 additions
and
87 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
6 changes: 3 additions & 3 deletions
6
wails-frontend/src/pages/PasswordPromptHandler/BuySellRoll/BuySellRoll.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
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
50 changes: 50 additions & 0 deletions
50
wails-frontend/src/pages/PasswordPromptHandler/SignComponentUtils/FromTo.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,50 @@ | ||
import { FiArrowRight } from 'react-icons/fi'; | ||
|
||
import Intl from '@/i18n/i18n'; | ||
import { maskAddress, maskNickname } from '@/utils'; | ||
|
||
interface FromToProps { | ||
fromNickname: string; | ||
fromAddress: string; | ||
toNickname?: string; | ||
toAddress: string; | ||
label: string; | ||
} | ||
|
||
export function FromTo(props: FromToProps) { | ||
const { | ||
fromNickname: nickname, | ||
fromAddress: walletAddress, | ||
toNickname: recipientNickname, | ||
toAddress: recipientAddress, | ||
label, | ||
} = props; | ||
|
||
return ( | ||
<div className="flex w-full items-center justify-between"> | ||
<div className="flex flex-col"> | ||
<div className="flex gap-2"> | ||
<p className="mas-menu-active"> | ||
{Intl.t('password-prompt.sign.from')} | ||
</p> | ||
<p className="mas-menu-default">{maskNickname(nickname)}</p> | ||
</div> | ||
<p className="mas-caption">{maskAddress(walletAddress)}</p> | ||
</div> | ||
<div className="h-8 w-8 rounded-full flex items-center justify-center bg-neutral"> | ||
<FiArrowRight size={24} className="text-primary" /> | ||
</div> | ||
<div className="flex flex-col"> | ||
<div className="flex gap-2"> | ||
<p className="mas-menu-active">{Intl.t(label)}</p> | ||
{recipientNickname ? ( | ||
<p className="mas-menu-default"> | ||
{maskNickname(recipientNickname)} | ||
</p> | ||
) : null} | ||
</div> | ||
<p className="mas-caption">{maskAddress(recipientAddress)}</p> | ||
</div> | ||
</div> | ||
); | ||
} |
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