This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { buildSwapParams } from 'swapper/src' | |
| import { | |
| Address, | |
| Chain, | |
| getContract, | |
| PublicClient, | |
| Transport | |
| } from 'viem' | |
| import { borrowStrategyABI } from '../../metadata/abis' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const encodedTransactions = [ | |
| [ | |
| // deploy position | |
| { | |
| "callData": "0xa2420976000000000000000000000000127316e7fd5f6d8a91dbf1f7c73ecd880045a819000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000196446bd406", | |
| "target": "0xeE156D8ea7b96a5524CcC3CF9283ab85E80E9534", | |
| "value": 0 | |
| }, | |
| // wrap ETH | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express') | |
| const next = require('next') | |
| const Cache = require('lru-cache'); | |
| const compression = require('compression') | |
| const port = parseInt(process.env.PORT, 10) || 3000 | |
| const dev = process.env.NODE_ENV !== 'production' | |
| const app = next({ dev }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| import TrackingModalContainer from '@containers/TrackingModal/TrackingModal'; | |
| import RevisionModalContainer from '@containers/RevisionModal/RevisionModal'; | |
| export const useTrackingModal = () => { | |
| const [newStatus, setNewStatus] = useState(null); | |
| const [isTrackingModalOpen, setTrackingModalOpen] = useState(false); | |
| const [trackingLead, setTrackingLead] = useState(null); | |
| const handleLeadStatusChange = (lead, value) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| const LeadListWithModals = ({ leads }) => { | |
| const [isRevisionModalOpen, setRevisionModalOpen] = useState(false); | |
| const [leadInRevision, setLeadInRevision] = useState(null); | |
| const [newStatus, setNewStatus] = useState(null); | |
| const [isTrackingModalOpen, setTrackingModalOpen] = useState(false); | |
| const [trackingLead, setTrackingLead] = useState(null); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { useState } from 'react'; | |
| const LeadListWithRevisionModal = ({ leads }) => { | |
| const [isRevisionModalOpen, setRevisionModalOpen] = useState(false); | |
| const [leadInRevision, setLeadInRevision] = useState(null); | |
| const handleRevisionRequest = (lead) => { | |
| setLeadInRevision(lead); | |
| setRevisionModalOpen(!isRevisionModalOpen); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import { useRevisionModal, useTrackingModal } from '../../hooks/modals'; | |
| const LeadListWithModals = ({ leads }) => { | |
| const [handleRevisionRequest, revisionModal] = useRevisionModal(); | |
| const [handleLeadStatusChange, trackingModal] = useTrackingModal(); | |
| return ( | |
| <> | |
| <LeadList | |
| leads={leads} |