Skip to content

Commit

Permalink
chore(deps): update dependency prettier to v3
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and faergeek committed Jul 5, 2023
1 parent d0fc054 commit f534a33
Show file tree
Hide file tree
Showing 192 changed files with 1,532 additions and 1,484 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ Example:
KeeperWallet.encryptMessage(
'My message',
'416z9d8DQDy5MPTqDhvReRBaPb19gEyVRWvHcewpP6Nc',
'my app'
'my app',
).then(encryptedMessage => {
console.log(encryptedMessage);
});
Expand All @@ -200,7 +200,7 @@ Example:
KeeperWallet.decryptMessage(
'**encrypted msg**',
'416z9d8DQDy5MPTqDhvReRBaPb19gEyVRWvHcewpP6Nc',
'my app'
'my app',
).then(message => {
console.log(message);
});
Expand Down Expand Up @@ -329,7 +329,7 @@ const authValidate = (
data: { host: string; data: string },
signature: string,
publicKey: string,
chainId: string | number
chainId: string | number,
): boolean => {
const chain =
typeof chainId === 'string' ? chainId : String.fromCharCode(chainId);
Expand Down
8 changes: 4 additions & 4 deletions README_ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ KeeperWallet.encryptMessage(`текст для шифрования`, `публ
KeeperWallet.encryptMessage(
'My message',
'416z9d8DQDy5MPTqDhvReRBaPb19gEyVRWvHcewpP6Nc',
'для меня'
'для меня',
).then(encryptedMessage => {
console.log(encryptedMessage);
});
Expand All @@ -172,7 +172,7 @@ KeeperWallet.encryptMessage(
KeeperWallet.decryptMessage(
`зашифрованный текст`,
`публичный ключ в кодировке base58`,
`префикс: строка, уникальная для каждого приложения`
`префикс: строка, уникальная для каждого приложения`,
);
```

Expand All @@ -181,7 +181,7 @@ KeeperWallet.decryptMessage(
```js
KeeperWallet.decryptMessage(
'**encrypted msg**',
'416z9d8DQDy5MPTqDhvReRBaPb19gEyVRWvHcewpP6Nc'
'416z9d8DQDy5MPTqDhvReRBaPb19gEyVRWvHcewpP6Nc',
).then(message => {
console.log(message);
});
Expand Down Expand Up @@ -340,7 +340,7 @@ const authValidate = (
data: { host: string; data: string },
signature: string,
publicKey: string,
chainId: string | number
chainId: string | number,
): boolean => {
const chain =
typeof chainId === 'string' ? chainId : String.fromCharCode(chainId);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"postcss-loader": "^7.0.1",
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^9.0.0",
"prettier": "^2.4.1",
"prettier": "^3.0.0",
"react-refresh": "^0.14.0",
"react-router-dom": "^6.4.0",
"redux-logger": "^3.0.6",
Expand Down
10 changes: 5 additions & 5 deletions scripts/PlatformPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ export default class PlatformPlugin {
JSON.stringify(
adaptManifestToPlatform(content, platformName),
null,
2
2,
),
'utf-8'
'utf-8',
);
} else {
await writeFile(platformFile, content);
}
})
)
)
}),
),
),
);
}
}
4 changes: 2 additions & 2 deletions scripts/zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ readFile(path.resolve(__dirname, './platforms.json'), 'utf8')
path.resolve(DIST_FOLDER, platformName),
path.resolve(
DIST_FOLDER,
`keeper-wallet-${process.env.KEEPER_VERSION}-${platformName}.zip`
)
`keeper-wallet-${process.env.KEEPER_VERSION}-${platformName}.zip`,
),
);
});
});
2 changes: 1 addition & 1 deletion src/_core/fetchInBatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { chunk } from './chunk';
export async function fetchInBatches<I, T>(
allItems: I[],
chunkSize: number,
fetchFn: (items: I[]) => Promise<T[]>
fetchFn: (items: I[]) => Promise<T[]>,
) {
const result: T[] = [];

Expand Down
2 changes: 1 addition & 1 deletion src/_core/polling.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export function startPolling(
ms: number,
fn: (abortSignal: AbortSignal) => Promise<void>
fn: (abortSignal: AbortSignal) => Promise<void>,
) {
const abortController = new AbortController();
let timeout: ReturnType<typeof setTimeout>;
Expand Down
12 changes: 6 additions & 6 deletions src/_core/signContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Login } from '../ui/components/pages/importEmail/login';
import * as styles from './signContext.module.css';

type CreateSign = <P>(
onConfirm: (params: P) => void
onConfirm: (params: P) => void,
) => (params: P) => Promise<void>;

export const SignContext = createContext<{ createSign: null | CreateSign }>({
Expand Down Expand Up @@ -67,7 +67,7 @@ function usePromiseDialogController(initiallyOpen = false) {
close,
isOpen,
}),
[close, isOpen, onCancel, onOk, open]
[close, isOpen, onCancel, onOk, open],
);
}

Expand Down Expand Up @@ -108,7 +108,7 @@ export function SignProvider({ children }: { children: ReactNode }) {
break;
}
},
[account, confirmDialog]
[account, confirmDialog],
);

const contextValue = useMemo(() => ({ createSign }), [createSign]);
Expand Down Expand Up @@ -163,7 +163,7 @@ export function SignProvider({ children }: { children: ReactNode }) {
}

export function useSign<OnConfirmParams>(
onConfirm: (params: OnConfirmParams) => void | Promise<void>
onConfirm: (params: OnConfirmParams) => void | Promise<void>,
) {
const [isSignPending, setIsSignPending] = useState(false);

Expand All @@ -176,10 +176,10 @@ export function useSign<OnConfirmParams>(
setIsSignPending(true);

return createSign(onConfirm)(params).finally(() =>
setIsSignPending(false)
setIsSignPending(false),
);
},
[createSign, onConfirm]
[createSign, onConfirm],
);

return { sign, isSignPending };
Expand Down
6 changes: 3 additions & 3 deletions src/_core/usdPrices.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function UsdPricesProvider({ children }: { children: React.ReactNode }) {

const assetIdsToFetch = useMemo(
() => Array.from(new Set(observedAssetIds.flat())),
[observedAssetIds]
[observedAssetIds],
);

const usdPrices = usePopupSelector(state => state.usdPrices);
Expand Down Expand Up @@ -82,7 +82,7 @@ export function UsdPricesProvider({ children }: { children: React.ReactNode }) {

export function useUsdPrices(assetIds: string[]) {
const isMainnet = usePopupSelector(
state => state.currentNetwork === NetworkName.Mainnet
state => state.currentNetwork === NetworkName.Mainnet,
);

const observe = useContext(UsdPricesContext);
Expand All @@ -102,7 +102,7 @@ export function useUsdPrices(assetIds: string[]) {
const assetIdsSet = new Set(assetIds);

return Object.fromEntries(
Object.entries(usdPrices).filter(([id]) => assetIdsSet.has(id))
Object.entries(usdPrices).filter(([id]) => assetIdsSet.has(id)),
);
}, [assetIds, usdPrices]);
}
2 changes: 1 addition & 1 deletion src/_core/wonka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type Browser from 'webextension-polyfill';
import { make } from 'wonka';

export function fromWebExtensionEvent<T extends unknown[]>(
event: Browser.Events.Event<(...args: T) => void>
event: Browser.Events.Event<(...args: T) => void>,
) {
return make<T>(observer => {
function listener(...args: T) {
Expand Down
10 changes: 5 additions & 5 deletions src/accounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Promise.all([
<AccountsRoot />
</RootWrapper>
</Provider>
</StrictMode>
</StrictMode>,
);

const updateState = createUpdateState(store);
Expand All @@ -70,8 +70,8 @@ Promise.all([

updateState(
Object.fromEntries(
Object.entries(changes).map(([key, v]) => [key, v.newValue])
)
Object.entries(changes).map(([key, v]) => [key, v.newValue]),
),
);
});

Expand Down Expand Up @@ -104,12 +104,12 @@ Promise.all([
Background.init(connect());
});
}),
publish
publish,
);

return createIpcCallProxy<keyof BackgroundUiApi, BackgroundUiApi>(
request => port?.postMessage(request),
fromWebExtensionPort(port)
fromWebExtensionPort(port),
);
}

Expand Down
4 changes: 2 additions & 2 deletions src/accounts/store/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export function createAccountsStore() {
...Object.values(middleware),
...(process.env.NODE_ENV === 'development'
? [createLogger({ collapsed: true })]
: [])
)
: []),
),
);

if (import.meta.webpackHot) {
Expand Down
2 changes: 1 addition & 1 deletion src/accounts/updateState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function createUpdateState(store: AccountsStore) {

const selectedAccount = getParam(
stateChanges.selectedAccount,
{} as unknown as undefined
{} as unknown as undefined,
);
if (
selectedAccount &&
Expand Down
4 changes: 2 additions & 2 deletions src/assets/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export const assetLogosByNetwork: Partial<{
Object.entries(assetIds).map(([network, nameToIdMap]) => [
network,
Object.fromEntries(
Object.entries(nameToIdMap).map(([name, id]) => [id, logosByName[name]])
Object.entries(nameToIdMap).map(([name, id]) => [id, logosByName[name]]),
),
])
]),
);
12 changes: 6 additions & 6 deletions src/assets/selectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,12 @@ export function AssetSelectModal({
asset.id === query ||
asset.name.toLowerCase().includes(query.toLowerCase()) ||
(!!asset.ticker &&
asset.ticker.toLowerCase().includes(query.toLowerCase()))
asset.ticker.toLowerCase().includes(query.toLowerCase())),
)
.map(asset => {
const balance = new Money(
new BigNumber(assetBalances[asset.id]?.balance ?? 0),
new Asset(asset)
new Asset(asset),
);

return {
Expand All @@ -133,12 +133,12 @@ export function AssetSelectModal({

return -1;
}),
[assetBalances, assets, query]
[assetBalances, assets, query],
);

useEffect(() => {
setSelectedIndex(
filteredAndSortedItems.findIndex(item => !item.asset.disabled)
filteredAndSortedItems.findIndex(item => !item.asset.disabled),
);
}, [filteredAndSortedItems]);

Expand Down Expand Up @@ -194,7 +194,7 @@ export function AssetSelectModal({
setSelectedIndex(prevState => {
if (
filteredAndSortedItems.every(
item => item.asset.disabled
item => item.asset.disabled,
)
) {
return -1;
Expand All @@ -220,7 +220,7 @@ export function AssetSelectModal({
setSelectedIndex(prevState => {
if (
filteredAndSortedItems.every(
item => item.asset.disabled
item => item.asset.disabled,
)
) {
return -1;
Expand Down
Loading

0 comments on commit f534a33

Please sign in to comment.