Skip to content

Commit

Permalink
fix horizontal scroll on incoming action (#119)
Browse files Browse the repository at this point in the history
* fixed horizontal scroll on incoming action

* fixed login redirect
  • Loading branch information
ChriLnth authored Jul 20, 2021
1 parent b34d696 commit 627948f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
9 changes: 5 additions & 4 deletions source/Background/Keyring.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const getKeyringHandler = (type, keyring) => ({
try {
unlocked = await keyring.unlock(params?.password);

if (unlocked) {
if (unlocked && params?.redirect) {
extension.storage.local.set({
router: 'home',
});
Expand Down Expand Up @@ -112,7 +112,8 @@ export const getKeyringHandler = (type, keyring) => ({
return { error: error.message, height: null };
}
},
[HANDLER_TYPES.EDIT_PRINCIPAL]: async ({ walletNumber, name, emoji }) => (
keyring.editPrincipal(walletNumber, { name, emoji })
),
[HANDLER_TYPES.EDIT_PRINCIPAL]:
async ({ walletNumber, name, emoji }) => (
keyring.editPrincipal(walletNumber, { name, emoji })
),
}[type]);
2 changes: 1 addition & 1 deletion source/Popup/Views/Login/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Login = ({ redirect }) => {
const handleLogin = () => {
sendMessage({
type: HANDLER_TYPES.UNLOCK,
params: { password },
params: { password, redirect: true },
}, (unlocked) => {
if (unlocked) {
if (redirect) {
Expand Down
2 changes: 1 addition & 1 deletion source/Popup/Views/SeedPhrase/Steps/Step2.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const Step2 = ({ handleChangeStep }) => {
const handleLogin = () => {
sendMessage({
type: HANDLER_TYPES.UNLOCK,
params: { password },
params: { password, redirect: false },
}, (unlocked) => (unlocked ? handleChangeStep() : setError(true)));
};

Expand Down
2 changes: 1 addition & 1 deletion source/ui/IncomingAction/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const IncomingAction = ({ image, url, action }) => {
return (
<div className={classes.infoContainer}>
<img src={image} className={classes.image} />
<Typography variant="h2">{url}</Typography>
<Typography variant="h2" className={classes.title}>{url}</Typography>
<Typography variant="subtitle1">{action}</Typography>
</div>
);
Expand Down
7 changes: 7 additions & 0 deletions source/ui/IncomingAction/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,11 @@ export default makeStyles((theme) => ({
height: 120,
marginBottom: `${theme.spacing(3)}px`,
},
title: {
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
overflow: 'hidden',
width: 370,
textAlign: 'center',
},
}));

0 comments on commit 627948f

Please sign in to comment.