Skip to content

Commit

Permalink
Fixs request connect styles (#241)
Browse files Browse the repository at this point in the history
* new whitelist styles

* fixs

* removed margin
  • Loading branch information
ChriLnth authored Sep 30, 2021
1 parent 2013906 commit 8125f7f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 10 deletions.
1 change: 1 addition & 0 deletions source/Pages/Notification/components/AllowAgent/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,6 @@ export default makeStyles({
justifyContent: 'center',
alignItems: 'center',
marginBottom: 20,
cursor: 'pointer',
},
});
24 changes: 15 additions & 9 deletions source/redux/wallet.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { createSlice } from '@reduxjs/toolkit';
import { ACTIVITY_STATUS, ACTIVITY_TYPES } from '@shared/constants/activity';
import {
formatAssetBySymbol, formatAssets, TOKENS, TOKEN_IMAGES,
formatAssetBySymbol,
formatAssets,
TOKENS,
TOKEN_IMAGES,
} from '@shared/constants/currencies';

/* eslint-disable no-param-reassign */
Expand Down Expand Up @@ -40,7 +43,9 @@ export const walletSlice = createSlice({
setTransactions: (state, action) => {
const mapTransaction = (trx) => {
const asset = formatAssetBySymbol(
trx?.amount, trx?.currency?.symbol, action?.payload?.icpPrice,
trx?.amount,
trx?.currency?.symbol,
action?.payload?.icpPrice,
);
const transaction = {
...asset,
Expand Down Expand Up @@ -70,7 +75,10 @@ export const walletSlice = createSlice({
state.assetsLoading = action.payload;
},
setCollections: (state, action) => {
if (state.walletNumber === action.payload?.walletNumber && action.payload.collections) {
if (
state.walletNumber === action.payload?.walletNumber
&& action.payload.collections
) {
state.collections = action.payload?.collections?.sort(
(a, b) => b?.tokens.length - a?.tokens.length,
);
Expand All @@ -80,12 +88,10 @@ export const walletSlice = createSlice({
state.collectionsLoading = action.payload;
},
removeNFT: (state, action) => {
const collections = state.collections.map(
(col) => ({
...col,
tokens: col.tokens.filter((token) => token.id !== action.payload?.id),
}),
);
const collections = state.collections.map((col) => ({
...col,
tokens: col.tokens.filter((token) => token.id !== action.payload?.id),
}));
state.collections = collections.filter((col) => col.tokens.length);
},
},
Expand Down
1 change: 0 additions & 1 deletion source/ui/CanisterInfo/components/Item/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default makeStyles((theme) => ({
display: 'flex',
alignItems: 'center',
width: '100%',
marginBottom: 20,
},
iconButton: {
marginLeft: 'auto',
Expand Down

0 comments on commit 8125f7f

Please sign in to comment.