mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 14:20:42 +08:00
Add custom eslint rule
Adding a custom Radicle ESLint rule to enforce one (1) space after a unary logical NOT (`!`) Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
@@ -23,7 +23,7 @@ export class WalletConnectSigner extends ethers.Signer {
|
||||
|
||||
async getAddress(): Promise<string> {
|
||||
const accountAddress = this.walletConnect.accounts[0];
|
||||
if (!accountAddress) {
|
||||
if (! accountAddress) {
|
||||
throw new Error(
|
||||
"The connected wallet has no accounts or there is a connection problem"
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
async function isAbleToWithdraw(amount: string): Promise<[boolean, string?]> {
|
||||
try {
|
||||
if (!$session) { return [false]; }
|
||||
if (! $session) { return [false]; }
|
||||
if (!amount || amount === "0") { return [false, "Not able to withdraw zero tokens"]; }
|
||||
if (toWei(amount).gt(maxWithdrawAmount)) return [false, `Reduce amount, max withdrawal is ${formatEther(maxWithdrawAmount)}`];
|
||||
let currentTime = new Date().getTime();
|
||||
|
||||
+2
-2
@@ -161,7 +161,7 @@ export function parseEnsLabel(name: string, config: Config): string {
|
||||
export function clickOutside(node: HTMLElement, onEventFunction: () => void): any {
|
||||
const handleClick = (event: any) => {
|
||||
const path = event.composedPath();
|
||||
if (!path.includes(node)) {
|
||||
if (! path.includes(node)) {
|
||||
onEventFunction();
|
||||
}
|
||||
};
|
||||
@@ -419,7 +419,7 @@ export async function getTokens(address: string, config: Config): Promise<Array<
|
||||
const balances = userBalances.tokenBalances.filter((token: any) => {
|
||||
// alchemy_getTokenBalances sometimes returns 0x and this does not work well with ethers.BigNumber
|
||||
if (token.tokenBalance !== "0x") {
|
||||
if (!BigNumber.from(token.tokenBalance).isZero()) {
|
||||
if (! BigNumber.from(token.tokenBalance).isZero()) {
|
||||
return token;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user