diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..1e57f5e9 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,8 @@ +.env +.gitignore +.prettierrc +.prettierignore +tsconfig.tsbuildinfo +yarn-error.log +yarn.lock +LICENSE \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 3bea07cd..7c2413a0 100644 --- a/.prettierrc +++ b/.prettierrc @@ -5,4 +5,4 @@ "printWidth": 100, "useTabs": false, "endOfLine": "auto" -} \ No newline at end of file +} diff --git a/components/CustomButton/CustomButton.tsx b/components/CustomButton/CustomButton.tsx index 2c6474f2..f0f9f5b8 100644 --- a/components/CustomButton/CustomButton.tsx +++ b/components/CustomButton/CustomButton.tsx @@ -116,6 +116,10 @@ const StyledButton = styled.button` const btnColor = { primary: "border-primary bg-primary hover:opacity-80 text-black", + primaryBorder: + "border-primary border border-opacity-60 text-primary bg-primary hover:opacity-80 bg-opacity-5", + errorBorder: + "border border-red-50 border-opacity-60 text-red-50 bg-red-50 bg-opacity-5 hover:opacity-80", secondary: "border border-gray-500 hover:border-gray-400 text-gray-300", secondary2: "border border-pink-400 hover:border-pink-400 text-pink-400", third: "rounded-full border border-1 border-black text-black font-bold", diff --git a/components/Header/WalletButton.tsx b/components/Header/WalletButton.tsx index 2850d5f7..b0ecddbc 100644 --- a/components/Header/WalletButton.tsx +++ b/components/Header/WalletButton.tsx @@ -8,12 +8,8 @@ import { Typography, Modal as MUIModal, } from "@mui/material"; -import { GiHamburgerMenu } from "@react-icons/all-files/gi/GiHamburgerMenu"; import type { WalletSelector } from "@near-wallet-selector/core"; -import CopyToClipboard from "react-copy-to-clipboard"; - import { BeatLoader } from "react-spinners"; -import Decimal from "decimal.js"; import { fetchAssets, fetchRefPrices } from "../../redux/assetsSlice"; import { logoutAccount, fetchAccount, setAccountId } from "../../redux/accountSlice"; import { useAppSelector, useAppDispatch } from "../../redux/hooks"; @@ -29,12 +25,12 @@ import { HamburgerMenu } from "./Menu"; import Disclaimer from "../Disclaimer"; import { useDisclaimer } from "../../hooks/useDisclaimer"; import { NearSolidIcon, ArrowDownIcon, CloseIcon, ArrowRightTopIcon } from "./svg"; -import NearIcon from "../../public/near-icon.svg"; import ClaimAllRewards from "../ClaimAllRewards"; import { formatWithCommas_usd } from "../../utils/uiNumber"; import { isMobileDevice } from "../../helpers/helpers"; import getConfig from "../../utils/config"; import CopyToClipboardComponent from "./CopyToClipboardComponent"; +import CustomButton from "../CustomButton/CustomButton"; const config = getConfig(); @@ -54,8 +50,9 @@ const WalletButton = () => { const selectorRef = useRef(); const [selector, setSelector] = useState(null); + const [currentWallet, setCurrentWallet] = useState(null); const rewards = useAppSelector(getAccountRewards); - + const isSignedIn = selector?.isSignedIn(); const hideModal = () => { dispatch(_hideModal()); }; @@ -71,17 +68,26 @@ const WalletButton = () => { }; const onMount = async () => { - if (selector) return; - const { selector: s } = await getBurrow({ fetchData, hideModal, signOut }); + let walletSelector = selector; + if (!selector) { + const { selector: s } = await getBurrow({ fetchData, hideModal, signOut }); + walletSelector = s; + selectorRef.current = s; + setSelector(s); + window.selector = s; + } - selectorRef.current = s; - setSelector(s); - window.selector = s; + if (walletSelector) { + const wallet: any = await walletSelector?.wallet(); + if (wallet) { + setCurrentWallet(wallet); + } + } }; useEffect(() => { onMount(); - }, []); + }, [accountId]); const onWalletButtonClick = async () => { if (!hasAgreedDisclaimer) { @@ -95,7 +101,9 @@ const WalletButton = () => { const handleSignOut = async () => { const { signOut: signOutBurrow } = await getBurrow(); - signOutBurrow(); + if (typeof signOutBurrow === "function") { + signOutBurrow(); + } trackLogout(); setAnchorEl(null); setDisclaimer(false); @@ -118,6 +126,7 @@ const WalletButton = () => { getUnClaimRewards, isMobile, rewards, + currentWallet, }} > {/* near balance */} @@ -252,9 +265,11 @@ function AccountDetail({ onClose }: { onClose?: () => void }) { getUnClaimRewards, isMobile, rewards, + currentWallet, } = useContext(WalletContext) as any; const [showTip, setShowTip] = useState(false); const [copyButtonDisabled, setCopyButtonDisabled] = useState(false); + function showToast() { if (copyButtonDisabled) return; setCopyButtonDisabled(true); @@ -264,6 +279,8 @@ function AccountDetail({ onClose }: { onClose?: () => void }) { setCopyButtonDisabled(false); }, 1000); } + + const changeWalletDisable = currentWallet?.id === "keypom"; return (
{isMobile && ( @@ -288,37 +305,57 @@ function AccountDetail({ onClose }: { onClose?: () => void }) { )}
-
- - Near Wallet +
+ {currentWallet?.metadata?.iconUrl && ( + + + + )} + {currentWallet?.metadata?.name}
-
{ - if (onClose) { - onClose(); + if (!changeWalletDisable) { + if (onClose) { + onClose(); + } + handleSwitchWallet(); } - handleSwitchWallet(); }} - className="flex flex-grow items-center justify-center border border-primary border-opacity-60 cursor-pointer rounded-md text-sm text-primary font-bold bg-primary hover:opacity-80 bg-opacity-5 py-1" > Change -
-
+ + { - if (onClose) { - onClose(); + if (!changeWalletDisable) { + if (onClose) { + onClose(); + } + handleSwitchWallet(); } - handleSignOut(); }} - className="flex flex-grow items-center justify-center border border-red-50 border-opacity-60 cursor-pointer rounded-md text-sm text-red-50 font-bold bg-red-50 bg-opacity-5 hover:opacity-80 py-1" > Disconnect -
+
diff --git a/data/datasource.js b/data/datasource.js index 3f3a6ed8..b99d8c75 100644 --- a/data/datasource.js +++ b/data/datasource.js @@ -97,6 +97,10 @@ class DataSource { config?.liquidationUrl, ); } + + getTxId(receipt_id) { + return this.callAPI(`/v1/search/?keyword=${receipt_id}`, "GET", null, null, config?.txIdApiUrl); + } } export default DataSource; diff --git a/helpers/helpers.ts b/helpers/helpers.ts index 818c9f1c..281f2dda 100644 --- a/helpers/helpers.ts +++ b/helpers/helpers.ts @@ -1,5 +1,5 @@ import millify from "millify"; -import { APY_FORMAT, DUST_FORMAT, TOKEN_FORMAT, USD_FORMAT } from "../store"; +import { APY_FORMAT, DUST_FORMAT, NUMBER_FORMAT, TOKEN_FORMAT, USD_FORMAT } from "../store"; export const formatTokenValue = (v) => { return Number(v).toLocaleString(undefined, TOKEN_FORMAT); @@ -30,6 +30,43 @@ export const millifyNumber = (v: string | number, ignoreBelow?: number, isDispla return millify(number); }; +export const formatTokenValueWithMilify = ( + v, + fractionDigits = 2, + bigNumberFractionDigits = 0, + milifyThreshold = 1000000, + zeroPlacement = "-", +) => { + if (v === 0 && zeroPlacement) { + return zeroPlacement; + } + if (Math.abs(Number(v)) >= milifyThreshold) { + return bigNumberMilify(Number(v), fractionDigits, bigNumberFractionDigits, zeroPlacement); + } + return Number(v).toLocaleString(undefined, TOKEN_FORMAT); +}; + +export const bigNumberMilify = ( + n, + fractionDigits = 2, + bigNumberFractionDigits = 0, + zeroPlacement = "-", +) => { + if (n === 0 && zeroPlacement) { + return zeroPlacement; + } + const formatNumber = (num, factor) => { + return (+(n / factor).toFixed(fractionDigits)).toLocaleString(undefined, NUMBER_FORMAT); + }; + + if (n >= 1e3 && n < 1e6) return `${formatNumber(n, 1e3)}K`; + if (n >= 1e6 && n < 1e9) return `${formatNumber(n, 1e6)}M`; + if (n >= 1e9 && n < 1e12) return `${formatNumber(n, 1e9)}B`; + if (n >= 1e12) return `${formatNumber(n, 1e12)}T`; + + return n.toFixed(fractionDigits); +}; + export const removeUndefinedInObj = (obj, removeNull) => { Object.keys(obj).forEach((key) => { if (removeNull) { diff --git a/hooks/useTokenDetails.ts b/hooks/useTokenDetails.ts index a92587d1..f203b12b 100644 --- a/hooks/useTokenDetails.ts +++ b/hooks/useTokenDetails.ts @@ -108,7 +108,7 @@ export const useTokenDetails = () => { }); const supplies = getSupplyDetails(tokenDetails); - const interestRatesCal = interestRate?.utilization.map((n, i) => { + const interestRatesCal = interestRate?.utilization?.map((n, i) => { const percent = n * 100; // const rateIndex = interestRate?.utilization.findIndex((i) => i === percent); const borrowRateRaw = interestRate.burrow_apr[i] * 100; diff --git a/next.config.js b/next.config.js index 451c42ed..215bbeac 100644 --- a/next.config.js +++ b/next.config.js @@ -31,13 +31,13 @@ module.exports = { return config; }, - async redirects() { - return [ - { - source: "/", - destination: "/markets", - permanent: true, - }, - ]; - }, + // async redirects() { + // return [ + // { + // source: "/", + // destination: "/markets", + // permanent: true, + // }, + // ]; + // }, }; diff --git a/package.json b/package.json index bf8f6b93..16836a44 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "dependencies": { "@emotion/react": "^11.10.4", "@emotion/styled": "^11.10.4", + "@keypom/selector": "^1.2.3", "@metamask/detect-provider": "^2.0.0", "@mui/icons-material": "^5.10.6", "@mui/lab": "^5.0.0-alpha.100", @@ -26,7 +27,7 @@ "@mui/styles": "^5.10.6", "@mui/system": "^5.10.6", "@mui/utils": "^5.10.6", - "@near-wallet-selector/core": "^8.5.4", + "@near-wallet-selector/core": "8.9.1", "@near-wallet-selector/here-wallet": "^8.5.4", "@near-wallet-selector/ledger": "^8.5.4", "@near-wallet-selector/meteor-wallet": "^8.5.4", diff --git a/pages/_app.tsx b/pages/_app.tsx index 0b608fec..199e4fb7 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -53,6 +53,7 @@ const Init = () => { }; useEffect(() => { + console.info("ttest"); dispatch(fetchConfig()); }, []); useEffect(fetchData, []); diff --git a/redux/selectors/getAccountRewards.ts b/redux/selectors/getAccountRewards.ts index 22468ff1..ca704018 100644 --- a/redux/selectors/getAccountRewards.ts +++ b/redux/selectors/getAccountRewards.ts @@ -87,7 +87,8 @@ export const computePoolsDailyAmount = ( shrinkToken(farmData.asset_farm_reward.reward_per_day, rewardAssetDecimals), ); - const dailyAmount = (boostedShares / totalBoostedShares) * totalRewardsPerDay; + const dailyAmount = + totalBoostedShares > 0 ? (boostedShares / totalBoostedShares) * totalRewardsPerDay : 0; const suppliedShares = Number( shrinkToken(portfolio.supplied[asset.token_id]?.shares || 0, assetDecimals), @@ -102,7 +103,8 @@ export const computePoolsDailyAmount = ( const shares = type === "supplied" ? suppliedShares + collateralShares : borrowedShares; const newBoostedShares = shares * multiplier; const newTotalBoostedShares = totalBoostedShares + newBoostedShares - boostedShares; - const newDailyAmount = (newBoostedShares / newTotalBoostedShares) * totalRewardsPerDay; + const newDailyAmount = + newTotalBoostedShares > 0 ? (newBoostedShares / newTotalBoostedShares) * totalRewardsPerDay : 0; return { dailyAmount, newDailyAmount, multiplier, totalBoostedShares, shares }; }; diff --git a/screens/Dashboard/index.tsx b/screens/Dashboard/index.tsx index 0d090fc7..ebbdcd88 100644 --- a/screens/Dashboard/index.tsx +++ b/screens/Dashboard/index.tsx @@ -12,6 +12,7 @@ import DashboardApy from "./dashboardApy"; import CustomTable from "../../components/CustomTable/CustomTable"; import { formatTokenValue, + formatTokenValueWithMilify, formatUSDValue, isMobileDevice, millifyNumber, @@ -142,7 +143,9 @@ const yourSuppliedColumns = [ cell: ({ originalData }) => { return ( <> -
{originalData?.collateral ? formatTokenValue(originalData?.collateral) : "-"}
+
+ {formatTokenValueWithMilify(originalData.collateral, 4)} +
{originalData?.collateral ? formatUSDValue(originalData.collateral * originalData.price) @@ -157,7 +160,9 @@ const yourSuppliedColumns = [ cell: ({ originalData }) => { return ( <> -
{formatTokenValue(originalData.supplied)}
+
+ {formatTokenValueWithMilify(originalData.supplied, 4)} +
{formatUSDValue(originalData.supplied * originalData.price)}
@@ -302,7 +307,9 @@ const yourBorrowedColumns = [ cell: ({ originalData }) => { return ( <> -
{formatTokenValue(originalData?.borrowed)}
+
+ {formatTokenValueWithMilify(originalData.borrowed, 4)} +
${millifyNumber(originalData.borrowed * originalData.price)}
diff --git a/screens/Dashboard/liquidations.tsx b/screens/Dashboard/liquidations.tsx index e22129f9..ea45cdb8 100644 --- a/screens/Dashboard/liquidations.tsx +++ b/screens/Dashboard/liquidations.tsx @@ -4,7 +4,7 @@ import { useAccountId, useUnreadLiquidation } from "../../hooks/hooks"; import { shrinkToken, TOKEN_FORMAT } from "../../store"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { getAssets } from "../../redux/assetsSelectors"; -import { getDateString, maskMiddleString } from "../../helpers/helpers"; +import { formatTokenValueWithMilify, getDateString } from "../../helpers/helpers"; import { getLiquidations } from "../../api/get-liquidations"; import { setUnreadLiquidation } from "../../redux/appSlice"; @@ -83,7 +83,8 @@ const columns = [ { header: () => (
- Health Factor
before Liquidate
+ Health Factor +
before Liquidate
), cell: ({ originalData }) => { @@ -104,9 +105,14 @@ const columns = [ const tokenAmount = Number( shrinkToken(d.amount, (metadata?.decimals || 0) + (extra_decimals || 0)), ); + return ( -
- {tokenAmount.toLocaleString(undefined, TOKEN_FORMAT)} {tokenSymbol} +
+ {formatTokenValueWithMilify(tokenAmount, 4)} {tokenSymbol}
); }); @@ -125,9 +131,14 @@ const columns = [ const tokenAmount = Number( shrinkToken(d.amount, (metadata?.decimals || 0) + (extra_decimals || 0)), ); + return ( -
- {tokenAmount.toLocaleString(undefined, TOKEN_FORMAT)} {tokenSymbol} +
+ {formatTokenValueWithMilify(tokenAmount, 4)} {tokenSymbol}
); }); @@ -138,7 +149,8 @@ const columns = [ { header: () => (
- Health Factor
after Liquidate
+ Health Factor +
after Liquidate
), cell: ({ originalData }) => { diff --git a/screens/Dashboard/records.tsx b/screens/Dashboard/records.tsx index 593d88cd..324d8246 100644 --- a/screens/Dashboard/records.tsx +++ b/screens/Dashboard/records.tsx @@ -16,7 +16,7 @@ const Records = ({ isShow }) => { const { toastMessage, showToast } = useToastMessage(); const assets = useAppSelector(getAssets); const [isLoading, setIsLoading] = useState(false); - const [docs, setDocs] = useState([]); + const [docs, setDocs] = useState([]); const [pagination, setPagination] = useState<{ page?: number; totalPages?: number; @@ -37,7 +37,7 @@ const Records = ({ isShow }) => { try { setIsLoading(true); const response = await Datasource.shared.getRecords(accountId, page, 10); - const list = response?.record_list?.map((d) => { + const list = response?.record_list?.map(async (d) => { let tokenId = d.token_id; if (nearNativeTokens.includes(tokenId)) { tokenId = nearTokenId; @@ -46,9 +46,13 @@ const Records = ({ isShow }) => { const cloned = { ...d.data }; cloned.metadata = standardizeAsset({ ...cloned.metadata }); d.data = cloned; - return d; + const txidResponse = await Datasource.shared.getTxId(d.receipt_id); + const txid = txidResponse?.receipts[0]?.originated_from_transaction_hash; + + return { ...d, txid }; }); - setDocs(list); + const resolvedList = await Promise.all(list); + setDocs(resolvedList); setPagination((d) => { return { ...d, @@ -63,8 +67,8 @@ const Records = ({ isShow }) => { } }; - const handleTxClick = (tx) => { - window.open(`https://nearblocks.io/txns/${tx}`); + const handleTxClick = (txid) => { + window.open(`https://nearblocks.io/txns/${txid}`); }; const columns = getColumns({ showToast, handleTxClick }); @@ -129,20 +133,20 @@ const getColumns = ({ showToast, handleTxClick }) => [ { header: () =>
View in NEAR explorer
, cell: ({ originalData }) => { - const { tx_id } = originalData || {}; - if (!tx_id) { + const { receipt_id, txid } = originalData || {}; + if (!receipt_id) { return null; } return (
handleTxClick(tx_id)} + onClick={() => handleTxClick(txid)} > - {maskMiddleString(tx_id, 4, 34)} + {maskMiddleString(txid, 4, 34)}
- showToast("Copied")}> + showToast("Copied")}>
diff --git a/screens/TokenDetail/interestRateChart.tsx b/screens/TokenDetail/interestRateChart.tsx index 67efbf5f..eb35a926 100644 --- a/screens/TokenDetail/interestRateChart.tsx +++ b/screens/TokenDetail/interestRateChart.tsx @@ -15,7 +15,7 @@ import { isMobileDevice } from "../../helpers/helpers"; const InterestRateChart = ({ data }) => { const { currentUtilRate } = data?.[0] || []; const isMobile = isMobileDevice(); - const currentData = data.find((d) => d.percent === Math.round(currentUtilRate)); + const currentData = data?.find((d) => d.percent === Math.round(currentUtilRate)); return ( { explorerUrl: "https://explorer.mainnet.near.org", liquidationUrl: "https://api.data-service.burrow.finance", recordsUrl: "https://indexer.ref.finance", + txIdApiUrl: "https://api2.nearblocks.io", SPECIAL_REGISTRATION_TOKEN_IDS: [ "17208628f84f5d6ad33f0da3bbbeb27ffcb398eac501a31bd6ad2011e36133a1", ], @@ -63,6 +64,7 @@ const getConfig = (env: string = defaultNetwork) => { explorerUrl: "https://explorer.testnet.near.org", liquidationUrl: "https://dev.data-service.ref-finance.com", recordsUrl: "https://dev-indexer.ref-finance.com", + txIdApiUrl: "https://api-testnet.nearblocks.io", SPECIAL_REGISTRATION_TOKEN_IDS: [ "3e2210e1184b45b64c8a434c0a7e7b23cc04ea7eb7a6c3c32520d03d4afcb8af", ], diff --git a/utils/index.ts b/utils/index.ts index 3b33e2c3..e07fc9f4 100644 --- a/utils/index.ts +++ b/utils/index.ts @@ -18,9 +18,13 @@ import { getWalletSelector, getAccount, functionCall } from "./wallet-selector-c import { UIAsset } from "../interfaces"; export const getViewAs = () => { - const url = new URL(window.location.href.replace("/#", "")); - const searchParams = new URLSearchParams(url.search); - return searchParams.get("viewAs"); + if (window.location.href.includes("#instant-url")) { + return null; + } else { + const url = new URL(window.location.href.replace("/#", "")); + const searchParams = new URLSearchParams(url.search); + return searchParams.get("viewAs"); + } }; interface GetBurrowArgs { @@ -213,6 +217,7 @@ export function decimalMin(a: string | number | Decimal, b: string | number | De b = new Decimal(b); return a.lt(b) ? a : b; } + export function standardizeAsset(asset) { if (asset.symbol === "wNEAR") { asset.symbol = nearMetadata.symbol; diff --git a/utils/wallet-selector-compat.ts b/utils/wallet-selector-compat.ts index 511681fd..e66aa921 100644 --- a/utils/wallet-selector-compat.ts +++ b/utils/wallet-selector-compat.ts @@ -17,6 +17,7 @@ import { Account } from "near-api-js/lib/account"; import { BrowserLocalStorageKeyStore } from "near-api-js/lib/key_stores"; import BN from "bn.js"; import { map, distinctUntilChanged } from "rxjs"; +import { setupKeypom } from "@keypom/selector"; import getConfig, { defaultNetwork, @@ -67,6 +68,21 @@ const walletConnect = setupWalletConnect({ const myNearWallet = setupMyNearWallet({ walletUrl: isTestnet ? "https://testnet.mynearwallet.com" : "https://app.mynearwallet.com", }); +const KEYPOM_OPTIONS = { + beginTrial: { + landing: { + title: "Welcome!", + }, + }, + wallets: [ + { + name: "MyNEARWallet", + description: "Secure your account with a Seed Phrase", + redirectUrl: `https://${defaultNetwork}.mynearwallet.com/linkdrop/ACCOUNT_ID/SECRET_KEY`, + iconUrl: "INSERT_ICON_URL_HERE", + }, + ], +}; export const getWalletSelector = async ({ onAccountChange }: GetWalletSelectorArgs) => { if (init) return selector; @@ -91,6 +107,17 @@ export const getWalletSelector = async ({ onAccountChange }: GetWalletSelectorAr name: "NEAR Wallet Selector", }, }), + setupKeypom({ + networkId: defaultNetwork, + signInContractId: LOGIC_CONTRACT_NAME, + trialAccountSpecs: { + url: "/trial-accounts/ACCOUNT_ID#SECRET_KEY", + modalOptions: KEYPOM_OPTIONS, + }, + instantSignInSpecs: { + url: "/#instant-url/ACCOUNT_ID#SECRET_KEY/MODULE_ID", + }, + }), setupLedger(), ], network: defaultNetwork, @@ -108,6 +135,9 @@ export const getWalletSelector = async ({ onAccountChange }: GetWalletSelectorAr accountId = nextAccounts[0]?.accountId; window.accountId = accountId; onAccountChange(accountId); + if (window.location.href.includes("#instant-url")) { + window.history.replaceState({}, "", "/"); + } }); const modal = setupModal(selector, { contractId: LOGIC_CONTRACT_NAME }); diff --git a/yarn.lock b/yarn.lock index efd5d9f6..8b7e0997 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1914,6 +1914,26 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" +"@keypom/core@1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@keypom/core/-/core-1.0.2.tgz#65bffdeb753baea14deb9a204582377abe90793b" + integrity sha512-FFmOwbZCj3g8IHEdnhbTMHIp53rKjcorOlyoIKk0HaoC8rB/+Cl/BP6It1HP6DxGHorccs7yB4RXBnJei60hAg== + dependencies: + "@near-wallet-selector/core" "^8.0.3" + bn.js "^5.2.1" + borsh "^0.7.0" + near-seed-phrase "^0.2.0" + util "^0.12.5" + +"@keypom/selector@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@keypom/selector/-/selector-1.2.3.tgz#93a53129714fb69ef13dd2cfc2621888107e7e36" + integrity sha512-Z/VlZwhSt3NJ+Dv5AkgXNZ2rcFbbrd4F2sC5oTDm/TH6ocoyx5MR6ltxCWEP5/D/8Zi1MghtCtZpxrh1sHub5A== + dependencies: + "@keypom/core" "1.0.2" + bn.js "^5.2.1" + borsh "^0.7.0" + "@ledgerhq/devices@^5.51.1": version "5.51.1" resolved "https://registry.npmjs.org/@ledgerhq/devices/-/devices-5.51.1.tgz" @@ -2489,7 +2509,7 @@ dependencies: rxjs "^7.8.0" -"@near-wallet-selector/core@8.7.0", "@near-wallet-selector/core@^8.5.4": +"@near-wallet-selector/core@8.7.0": version "8.7.0" resolved "https://registry.npmjs.org/@near-wallet-selector/core/-/core-8.7.0.tgz#65a681c332b46f47bf4ca51b53ee92726b2d9cda" integrity sha512-H1Mc0xyWsy5Vjscn8gjK8y0X1wG5EBH9VuVQ+mFOtdyt8y+7Pttf/0dD91oAIwCo7Pu/ryPukcr6IGAz1R05cA== @@ -2519,6 +2539,26 @@ js-sha256 "0.9.0" rxjs "7.8.1" +"@near-wallet-selector/core@8.9.1": + version "8.9.1" + resolved "https://registry.yarnpkg.com/@near-wallet-selector/core/-/core-8.9.1.tgz#7d4de41ff18cde6530d0153e8335d5e366c07452" + integrity sha512-EY8PmKyNoW/pWsZFZM9V2sluSMn1DPQ8PDj+veiOCbuMP2USJ5j9qxJd1iJy07JbmI/40EuCA6IAZ6SbukzaUQ== + dependencies: + borsh "0.7.0" + events "3.3.0" + js-sha256 "0.9.0" + rxjs "7.8.1" + +"@near-wallet-selector/core@^8.0.3": + version "8.9.3" + resolved "https://registry.yarnpkg.com/@near-wallet-selector/core/-/core-8.9.3.tgz#ac15ef869da4762d8337552a9f63b9b3a76245ed" + integrity sha512-Mjmos4ska8eHwU/tGiWdAY+hHrFRSIpsmLYEfWuO/Uh1bWbJVueyKI7OGxbyWEOL1GJw1J5rx+MzXRS+U3fJow== + dependencies: + borsh "0.7.0" + events "3.3.0" + js-sha256 "0.9.0" + rxjs "7.8.1" + "@near-wallet-selector/here-wallet@^8.5.4": version "8.7.0" resolved "https://registry.npmjs.org/@near-wallet-selector/here-wallet/-/here-wallet-8.7.0.tgz#be01991208baf5f18d19074da8f676cc07911813" @@ -4949,6 +4989,11 @@ ava@^4.3.3: write-file-atomic "^4.0.1" yargs "^17.5.1" +available-typed-arrays@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz#ac812d8ce5a6b976d738e1c45f08d0b00bc7d725" + integrity sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg== + axe-core@^4.4.3: version "4.4.3" resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.4.3.tgz" @@ -5325,6 +5370,15 @@ call-bind@^1.0.0, call-bind@^1.0.2: function-bind "^1.1.1" get-intrinsic "^1.0.2" +call-bind@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.5.tgz#6fa2b7845ce0ea49bf4d8b9ef64727a2c2e2e513" + integrity sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ== + dependencies: + function-bind "^1.1.2" + get-intrinsic "^1.2.1" + set-function-length "^1.1.1" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -6123,6 +6177,15 @@ defer-to-connect@^1.0.1: resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== +define-data-property@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.1.tgz#c35f7cd0ab09883480d12ac5cb213715587800b3" + integrity sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" @@ -6461,6 +6524,11 @@ es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19 string.prototype.trimstart "^1.0.5" unbox-primitive "^1.0.2" +es-errors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-errors/-/es-errors-1.0.0.tgz#1936450fb8cff7bffb969335d0e55dfca7279aab" + integrity sha512-yHV74THqMJUyFKkHyN7hyENcEZM3Dj2a2IrdClY+IT4BFQHkIVwlh8s6uZfjsFydMdNHv0F5mWgAA3ajFbsvVQ== + es-shim-unscopables@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz" @@ -7024,6 +7092,13 @@ follow-redirects@^1.14.9: resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz" @@ -7084,6 +7159,11 @@ function-bind@^1.1.1: resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + function.prototype.name@^1.1.5: version "1.1.5" resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.5.tgz" @@ -7151,6 +7231,17 @@ get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1, get-intrinsic@ has "^1.0.3" has-symbols "^1.0.3" +get-intrinsic@^1.2.1, get-intrinsic@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.3.tgz#9d2d284a238e62672f556361e7d4e1a4686ae50e" + integrity sha512-JIcZczvcMVE7AUOP+X72bh8HqHBRxFdz5PDHYtNG/lE3yk9b3KZBJlwFcTyPYjg3L4RLLmZJzvjxhaZVapxFrQ== + dependencies: + es-errors "^1.0.0" + function-bind "^1.1.2" + has-proto "^1.0.1" + has-symbols "^1.0.3" + hasown "^2.0.0" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" @@ -7304,6 +7395,13 @@ globby@^13.1.1: merge2 "^1.4.1" slash "^4.0.0" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + got@^9.6.0: version "9.6.0" resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz" @@ -7353,6 +7451,18 @@ has-property-descriptors@^1.0.0: dependencies: get-intrinsic "^1.1.1" +has-property-descriptors@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz#52ba30b6c5ec87fd89fa574bc1c39125c6f65340" + integrity sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg== + dependencies: + get-intrinsic "^1.2.2" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" @@ -7365,6 +7475,13 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" +has-tostringtag@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz#2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" @@ -7399,6 +7516,13 @@ hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" +hasown@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c" + integrity sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA== + dependencies: + function-bind "^1.1.2" + hast-util-whitespace@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-2.0.0.tgz" @@ -7615,6 +7739,14 @@ irregular-plurals@^3.3.0: resolved "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz" integrity sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g== +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" @@ -7652,7 +7784,7 @@ is-buffer@~1.1.6: resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-callable@^1.1.4, is-callable@^1.2.6: +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.6: version "1.2.7" resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== @@ -7715,6 +7847,13 @@ is-generator-fn@^2.0.0: resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" @@ -7851,6 +7990,13 @@ is-symbol@^1.0.2, is-symbol@^1.0.3: dependencies: has-symbols "^1.0.2" +is-typed-array@^1.1.3: + version "1.1.13" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.13.tgz#d6c5ca56df62334959322d7d7dd1cca50debe229" + integrity sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw== + dependencies: + which-typed-array "^1.1.14" + is-typedarray@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" @@ -11248,6 +11394,17 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-length@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.0.tgz#2f81dc6c16c7059bda5ab7c82c11f03a515ed8e1" + integrity sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w== + dependencies: + define-data-property "^1.1.1" + function-bind "^1.1.2" + get-intrinsic "^1.2.2" + gopd "^1.0.1" + has-property-descriptors "^1.0.1" + set-harmonic-interval@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz" @@ -12269,6 +12426,17 @@ util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== +util@^0.12.5: + version "0.12.5" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" + integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + which-typed-array "^1.1.2" + utility-types@^3.10.0: version "3.10.0" resolved "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz#ea4148f9a741015f05ed74fd615e1d20e6bed82b" @@ -12404,6 +12572,17 @@ which-module@^2.0.0: resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== +which-typed-array@^1.1.14, which-typed-array@^1.1.2: + version "1.1.14" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.14.tgz#1f78a111aee1e131ca66164d8bdc3ab062c95a06" + integrity sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg== + dependencies: + available-typed-arrays "^1.0.6" + call-bind "^1.0.5" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.1" + which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz"