Skip to content

Commit

Permalink
Fix/last pr commit (#1165)
Browse files Browse the repository at this point in the history
* chore: fix pipeline

* chore: fix pipeline

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
towanTG and github-actions[bot] authored Jan 22, 2025
1 parent 36a65e1 commit e5ec2de
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 25 deletions.
2 changes: 1 addition & 1 deletion packages/swapkit/helpers/src/types/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type TokenNames =
| (typeof tokenLists)["CaviarV1List"]["tokens"][number]["identifier"]
| (typeof tokenLists)["ChainflipList"]["tokens"][number]["identifier"]
| (typeof tokenLists)["JupiterList"]["tokens"][number]["identifier"]
| (typeof tokenLists)["KadoList"]["tokens"][number]["identifier"]
// | (typeof tokenLists)["KadoList"]["tokens"][number]["identifier"]
| (typeof tokenLists)["MayaList"]["tokens"][number]["identifier"]
// | (typeof tokenLists)['OciswapV1List']["tokens"][number]["identifier"]
| (typeof tokenLists)["OneInchList"]["tokens"][number]["identifier"]
Expand Down
26 changes: 13 additions & 13 deletions packages/swapkit/tokens/src/tokenLists/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export { list as CaviarV1List } from "./caviar_v1.ts";
export { list as ChainflipList } from "./chainflip.ts";
export { list as JupiterList } from "./jupiter.ts";
export { list as MayaList } from "./mayachain.ts";
export { list as OneInchList } from "./oneinch.ts";
export { list as OpenOceanV2List } from "./openocean_v2.ts";
export { list as PancakeswapList } from "./pancakeswap.ts";
export { list as PangolinList } from "./pangolin_v1.ts";
export { list as SushiswapList } from "./sushiswap_v2.ts";
export { list as ThorchainList } from "./thorchain.ts";
export { list as TraderjoeV2List } from "./traderjoe_v2.ts";
export { list as UniswapV2List } from "./uniswap_v2.ts";
export { list as UniswapV3List } from "./uniswap_v3.ts";
export { list as CaviarV1List } from "./caviar_v1";
export { list as ChainflipList } from "./chainflip";
export { list as JupiterList } from "./jupiter";
export { list as MayaList } from "./mayachain";
export { list as OneInchList } from "./oneinch";
export { list as OpenOceanV2List } from "./openocean_v2";
export { list as PancakeswapList } from "./pancakeswap";
export { list as PangolinList } from "./pangolin_v1";
export { list as SushiswapList } from "./sushiswap_v2";
export { list as ThorchainList } from "./thorchain";
export { list as TraderjoeV2List } from "./traderjoe_v2";
export { list as UniswapV2List } from "./uniswap_v2";
export { list as UniswapV3List } from "./uniswap_v3";
23 changes: 22 additions & 1 deletion packages/swapkit/tokens/src/tokenLists/jupiter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
export const list = {
export const list: {
provider: "JUPITER";
chainId: "solana";
name: "JUPITER";
timestamp: string;
version: {
major: number;
minor: number;
patch: number;
};
keywords: string[];
count: number;
tokens: {
address: string;
chain: string;
chainId: string;
decimals: number;
identifier: string;
logoURI: string;
ticker: string;
}[];
} = {
provider: "JUPITER",
chainId: "solana",
name: "JUPITER",
Expand Down
20 changes: 10 additions & 10 deletions playgrounds/vite/src/Send/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ export default function Send({
inputAsset?: AssetValue;
}) {
const [inputAssetValue, setInput] = useState(inputAsset?.mul(0));
const [inputString, setInputString] = useState('');
const [inputString, setInputString] = useState("");
const [recipient, setRecipient] = useState("");

const handleInputChange = useCallback(
(value: string) => {
if (!Number(value)) {
setInputString(value)
return
};
setInputString(value)
setInput(inputAssetValue ? inputAssetValue.set(value) : inputAsset?.set(value));
if (!Number(value)) {
setInputString(value);
return;
}
setInputString(value);
setInput(inputAssetValue ? inputAssetValue.set(value) : inputAsset?.set(value));
},
[inputAssetValue, inputAsset],
);
Expand Down Expand Up @@ -61,10 +61,10 @@ export default function Send({
<span>Input Amount:</span>
<input
onChange={(e) => {
handleInputChange(e.target.value)
}}
handleInputChange(e.target.value);
}}
placeholder=""
value={!Number(inputString) ? inputString : inputAssetValue?.getValue('string')}
value={Number(inputString) ? inputAssetValue?.getValue("string") : inputString}
/>
</div>

Expand Down

0 comments on commit e5ec2de

Please sign in to comment.