Skip to content

Commit

Permalink
support gate.io
Browse files Browse the repository at this point in the history
  • Loading branch information
domechn committed Nov 19, 2023
1 parent 99deaf6 commit c6f8e8e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/assets/icons/gate-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions src/components/configuration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import { useToast } from "@/components/ui/use-toast";
import DeleteIcon from "@/assets/icons/delete-icon.png";
import BinanceLogo from "@/assets/icons/binance-logo.svg";
import GateLogo from "@/assets/icons/gate-logo.svg";
import OkexLogo from "@/assets/icons/okex-logo.svg";
import BTCLogo from "@/assets/icons/btc-logo.svg";
import ETHLogo from "@/assets/icons/eth-logo.svg";
Expand Down Expand Up @@ -99,6 +100,10 @@ const cexOptions = [
value: "okex",
label: "OKX",
},
{
value: "gate",
label: "Gate.io",
},
];

const walletOptions = [
Expand Down Expand Up @@ -378,6 +383,12 @@ const App = ({ onConfigurationSave }: { onConfigurationSave?: () => void }) => {
src={BinanceLogo}
></img>
)}
{ex.type === "gate" && (
<img
className="h-4 w-4 text-muted-foreground"
src={GateLogo}
></img>
)}
{/* okex */}
{ex.type === "okex" && (
<img
Expand Down
2 changes: 1 addition & 1 deletion src/middlelayers/datafetch/coins/cex/gate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,6 @@ export class GateExchange implements Exchanger {
}

async verifyConfig(): Promise<boolean> {
return this.fetchTotalBalance().then(() => true).catch(() => false)
return this.fetchSpotBalance().then(() => true).catch(() => false)
}
}

0 comments on commit c6f8e8e

Please sign in to comment.