Skip to content

Commit

Permalink
use https rpc
Browse files Browse the repository at this point in the history
  • Loading branch information
sehyunc committed Feb 23, 2024
1 parent a41bb3f commit 3713ad1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default function DepositButton() {
],
watch: true,
})
console.log("🚀 ~ DepositButton ~ allowance:", allowance)
const needsApproval = !allowance || allowance === BigInt(0)

const { config } = usePrepareErc20Approve({
Expand Down Expand Up @@ -101,9 +102,9 @@ export default function DepositButton() {
isDisabled
? { backgroundColor: "transparent" }
: {
borderColor: "white.60",
color: "white",
}
borderColor: "white.60",
color: "white",
}
}
transform={baseTokenAmount ? "translateY(10px)" : "translateY(-10px)"}
visibility={baseTokenAmount ? "visible" : "hidden"}
Expand All @@ -119,8 +120,8 @@ export default function DepositButton() {
{shouldUse
? buttonText
: needsApproval
? `Approve ${baseTicker}`
: `Deposit ${baseTokenAmount || ""} ${baseTicker}`}
? `Approve ${baseTicker}`
: `Deposit ${baseTokenAmount || ""} ${baseTicker}`}
</Button>
{signInIsOpen && <CreateStepper onClose={onCloseSignIn} />}
</>
Expand Down
3 changes: 3 additions & 0 deletions trade.renegade.fi/app/(desktop)/[base]/[quote]/deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import {

import { TokenSelectModal } from "@/components/modals/token-select-modal"
import DepositButton from "@/app/(desktop)/[base]/[quote]/deposit-button"
import { ViewEnum, useApp } from "@/contexts/App/app-context"

function DepositInner() {
const { setView } = useApp()
const {
isOpen: tokenMenuIsOpen,
onOpen: onOpenTokenMenu,
Expand Down Expand Up @@ -47,6 +49,7 @@ function DepositInner() {
position="absolute"
top="-24px"
fontWeight="600"
onClick={() => setView(ViewEnum.TRADING)}
variant="link"
>
<ChevronLeftIcon />
Expand Down
2 changes: 1 addition & 1 deletion trade.renegade.fi/app/api/fund/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "viem"
import { privateKeyToAccount } from "viem/accounts"

import { stylusDevnetEc2 } from "@/lib/stylus"
import { stylusDevnetEc2 } from "@/lib/chain"

const abi = parseAbi([
"function transfer(address to, uint256 amount) returns (bool)",
Expand Down
2 changes: 1 addition & 1 deletion trade.renegade.fi/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Toaster } from "sonner"
import { createPublicClient, http } from "viem"
import { WagmiConfig, createConfig } from "wagmi"

import { stylusDevnetEc2 } from "@/lib/stylus"
import { stylusDevnetEc2 } from "@/lib/chain"

const { definePartsStyle, defineMultiStyleConfig } =
createMultiStyleConfigHelpers(menuAnatomy.keys)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ export const stylusDevnet = defineChain({
url: "https://stylus-testnet-explorer.arbitrum.io/",
},
},
contracts: {
multicall2: {
address: "0x42aaE78422EF3e8E6d0D88e58E25CA7C7Ecb9D5a",
blockCreated: 26,
},
},
})

export const stylusDevnetEc2 = defineChain({
Expand All @@ -48,13 +42,13 @@ export const stylusDevnetEc2 = defineChain({
},
rpcUrls: {
default: {
http: ["http://35.183.100.90:8547"],
http: ["https://35.183.100.90/"],
webSocket: [
"wss://mainnet.infura.io/ws/v3/68c04ec6f9ce42c5becbed52a464ef81",
],
},
public: {
http: ["http://35.183.100.90:8547"],
http: ["https://35.183.100.90/"],
webSocket: [
"wss://mainnet.infura.io/ws/v3/68c04ec6f9ce42c5becbed52a464ef81",
],
Expand Down

0 comments on commit 3713ad1

Please sign in to comment.