Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync Prod and Dev Branches #235

Merged
merged 42 commits into from
Nov 28, 2023
Merged
Changes from 9 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
310adaf
Prod Release
qudo-code Jun 7, 2023
8b19cdc
Revert "Prod Release" (#198)
qudo-code Jun 7, 2023
1e65218
Release Prod (single app refactor) (#203)
qudo-code Jun 18, 2023
71aee2a
Release Prod (#207)
qudo-code Jun 30, 2023
c2f4360
transactions fix
solhosty Aug 12, 2023
9e932bb
remove files
solhosty Aug 12, 2023
ff16828
Merge pull request #210 from helius-labs/trpc-transactions
solhosty Aug 12, 2023
52f1fde
better media view (#211)
qudo-code Aug 22, 2023
cadb723
Q/media updates (#212)
qudo-code Aug 25, 2023
2391c96
rm connect wallet (#213)
qudo-code Aug 25, 2023
2e6a6de
Q/fix cnft history (#220)
qudo-code Sep 9, 2023
1ff90f0
devnet additions
solhosty Sep 15, 2023
4508012
reverting
solhosty Sep 15, 2023
3007b8c
transaction change
solhosty Sep 15, 2023
8ea2c21
txn fixes
solhosty Sep 15, 2023
0e470b5
txn fixes
solhosty Sep 15, 2023
acc9efa
network button
solhosty Sep 15, 2023
75bc94c
new commit
solhosty Sep 15, 2023
9260871
menu change
solhosty Sep 15, 2023
19a5fbb
token fix
solhosty Sep 15, 2023
486de01
Merge pull request #222 from helius-labs/devnet
solhosty Sep 15, 2023
1260e79
new changes
solhosty Sep 15, 2023
de3f739
Merge pull request #223 from helius-labs/styling
solhosty Sep 15, 2023
c3394db
new
solhosty Sep 15, 2023
f9a29b3
Merge pull request #224 from helius-labs/account
solhosty Sep 15, 2023
2accd65
menu changes, nav addition
solhosty Sep 17, 2023
e177331
Merge pull request #225 from helius-labs/menu
solhosty Sep 17, 2023
0f17fa9
lowering opacity of docs button
solhosty Sep 17, 2023
b84d5af
Merge pull request #226 from helius-labs/new-nav
solhosty Sep 17, 2023
071f938
new tool tips for menu items
solhosty Sep 18, 2023
0cd11d0
sellerFeeBasisPoints
solhosty Sep 27, 2023
152825b
sellerFeeBasisPoints
solhosty Sep 27, 2023
692fa6e
Merge pull request #228 from helius-labs/sellerFeeBasisPoints
solhosty Sep 27, 2023
783ab9b
github-actions[bot] Nov 10, 2023
c049892
github-actions[bot] Nov 10, 2023
4645621
Initial Fix Commit
0xIchigo Nov 14, 2023
e285a24
The Conflictooorr
0xIchigo Nov 14, 2023
15508f6
Fix Lint Errors
0xIchigo Nov 14, 2023
daa8583
Fix Build Error in vite.config.js
0xIchigo Nov 14, 2023
13812dc
Disable Lint for transactions.svelte
0xIchigo Nov 14, 2023
7a01d0c
Bug Fixes
0xIchigo Nov 14, 2023
0c2982c
Merge pull request #234 from helius-labs/vercel/staging
0xIchigo Nov 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run test
30 changes: 16 additions & 14 deletions src/lib/components/account-header.svelte
Original file line number Diff line number Diff line change
@@ -61,13 +61,16 @@
balance.set($accountInfo.data.balance);
}
function toggleNetwork() {
isMainnetValue = !isMainnetValue;
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue));
const params = new URLSearchParams(window.location.search);
params.set("network", isMainnetValue ? "mainnet" : "devnet");
history.replaceState({}, "", "?" + params.toString());
history.go(0);
}
isMainnetValue = !isMainnetValue;
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue));

const params = new URLSearchParams(window.location.search);

params.set("network", isMainnetValue ? "mainnet" : "devnet");

history.replaceState({}, "", "?" + params.toString());
history.go(0);
}

$: worth = $balance * $price?.data;
</script>
@@ -77,7 +80,6 @@
let:usernames
let:usernameIsLoading
>

<div class="nav sticky top-16 z-30 gap-2 bg-base-100 px-3 pt-2">
<div class="flex flex-col bg-base-100">
<div class="flex items-center justify-between">
@@ -95,12 +97,12 @@
</div>
</div>
<!-- svelte-ignore a11y-click-events-have-key-events -->
<div
class="badge cursor-default badge-outline py-2 px-4 flex relative mx-2 opacity-90"
on:click={toggleNetwork}
>
{isMainnetValue ? "mainnet" : "devnet"}
</div>
<div
class="badge-outline badge relative mx-2 flex cursor-default px-4 py-2 opacity-90"
on:click={toggleNetwork}
>
{isMainnetValue ? "mainnet" : "devnet"}
</div>
</div>
<div class="relative text-right">
<h1 class="text-md md:block">
2 changes: 1 addition & 1 deletion src/lib/components/copy-button.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type { Icon as IconType } from "src/lib/types";
import type { Icon as IconType } from "$lib/types";

import { copyToClipboard } from "$lib/util/clipboard";

2 changes: 1 addition & 1 deletion src/lib/components/footer.svelte
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
<div class="col-span-1 flex w-full justify-end">
<div class="mr-12">
<a
href="https://discord.gg/nSkq35VUf5"
href="https://discord.gg/mV3dNPwDnZ"
class="btn-ghost btn"
>
<Icon
4 changes: 2 additions & 2 deletions src/lib/components/log-messages.svelte
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<style>
.text-sky {
@apply text-info-content;
color: text-info-content;
}

.text-tangerine {
@apply text-[#e8a034];
color: text-#e8a034;
}
</style>

2 changes: 1 addition & 1 deletion src/lib/components/modals/help.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type { Icon as IconType } from "src/lib/types";
import type { Icon as IconType } from "$lib/types";
import Icon from "$lib/components/icon.svelte";
const supportedSearches: Array<[IconType, string]> = [
["globe", ".sol, .abc, .poor, .bonk domains"],
2 changes: 1 addition & 1 deletion src/lib/components/modals/menu.svelte
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
import Network from "../network.svelte";
</script>

{#each [{ name: "Contribute", url: "https://github.com/helius-labs/xray" }, { name: "Join Discord", url: "https://discord.gg/nSkq35VUf5" }] as { name, url }}
{#each [{ name: "Home", url: "/" }, { name: "About Helius APIs", url: "https://helius.xyz" }, { name: "Contribute", url: "https://github.com/helius-labs/xray" }, { name: "Join Discord", url: "https://discord.gg/nSkq35VUf5" }] as { name, url }}
<a
href={url}
data-sveltekit-reload
2 changes: 0 additions & 2 deletions src/lib/components/modals/transaction-filter.svelte
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@
import { transactionActionsMetadata } from "$lib/types";
import { filterStore } from "$lib/util/stores/filter";

import Icon from "../icon.svelte";

const handleClick = (key: string) => {
$filterStore = key;
hideModal();
2 changes: 1 addition & 1 deletion src/lib/components/modals/wallets.svelte
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

import shortenString from "$lib/util/shorten-string";

import { hideModal } from "$lib/state/stores/modals";
// import { hideModal } from "$lib/state/stores/modals";
</script>

{#each addresses as address}
66 changes: 41 additions & 25 deletions src/lib/components/nav.svelte
Original file line number Diff line number Diff line change
@@ -45,34 +45,50 @@

<div class="col-span-2 flex items-center justify-end">
<div class="flex justify-end pr-2">
<div class="tooltip" data-tip="Docs">
<a href="https://docs.helius.dev/welcome/what-is-helius" rel="noreferrer" target="_blank"
class="btn-ghost btn"
<div
class="tooltip"
data-tip="Docs"
>
<img class="h-6 opacity-90" src="docs.svg" alt="">
</a>
</div>
<div class="tooltip" data-tip="Help">
<button
class="btn-ghost btn"
on:click={() => showModal("HELP")}
<a
href="https://docs.helius.dev/welcome/what-is-helius"
rel="noreferrer"
target="_blank"
class="btn-ghost btn"
>
<img
class="h-6 opacity-90"
src="docs.svg"
alt=""
/>
</a>
</div>
<div
class="tooltip"
data-tip="Help"
>
<Icon
id="question"
size="md"
/>
</button>
</div>
<div class="tooltip" data-tip="Menu">
<button
class="btn-ghost btn"
on:click={() => showModal("MENU")}
<button
class="btn-ghost btn"
on:click={() => showModal("HELP")}
>
<Icon
id="question"
size="md"
/>
</button>
</div>
<div
class="tooltip"
data-tip="Menu"
>
<Icon
id="hamburger"
size="lg"
/>
</button>
<button
class="btn-ghost btn"
on:click={() => showModal("MENU")}
>
<Icon
id="hamburger"
size="lg"
/>
</button>
</div>
</div>
</div>
14 changes: 8 additions & 6 deletions src/lib/components/network.svelte
Original file line number Diff line number Diff line change
@@ -10,11 +10,11 @@
}
});
onMount(() => {
const params = new URLSearchParams(window.location.search);
const network = params.get("network");
isMainnetValue = network !== "devnet";
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue));
});
const params = new URLSearchParams(window.location.search);
const network = params.get("network");
isMainnetValue = network !== "devnet";
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue));
});
function toggleNetwork(event: Event) {
isMainnetValue = (event.target as HTMLInputElement).checked;
localStorage.setItem("isMainnet", JSON.stringify(isMainnetValue));
@@ -25,7 +25,9 @@
}
</script>

<div class="toggle-container m-auto p-4 mt-2 flex w-full flex-col justify-center">
<div
class="toggle-container m-auto mt-2 flex w-full flex-col justify-center p-4"
>
<label class="toggle-label m-auto flex flex-col">
<input
type="checkbox"
8 changes: 7 additions & 1 deletion src/lib/components/providers/token-provider.svelte
Original file line number Diff line number Diff line change
@@ -49,7 +49,7 @@
},
};

const metadata: UITokenMetadata = {
export const metadata: UITokenMetadata = {
address: "",
attributes: [],
collectionKey: "",
@@ -123,6 +123,12 @@
data?.offChainMetadata?.metadata?.name ||
data?.legacyMetadata?.name ||
data?.onChainMetadata?.metadata?.data.name;
metadata.files = data?.offChainMetadata?.metadata?.properties?.files;
// Checking all files to see if a video exists
metadata.video_uri =
data?.offChainMetadata?.metadata?.properties?.files?.find(
(file: any) => file.type.startsWith("video/")
)?.uri;
}

$: tokenIsLoading = address !== SOL && $token.isLoading;
92 changes: 46 additions & 46 deletions src/lib/components/search.svelte
Original file line number Diff line number Diff line change
@@ -103,63 +103,63 @@
};

const newSearch = async () => {
searchError = "";
isSearching = true;
searchError = "";
isSearching = true;

try {
const response = await fetch(
`/api/search/${inputValue}?network=${
isMainnetValue ? "mainnet" : "devnet"
}`
);
try {
const response = await fetch(
`/api/search/${inputValue}?network=${
isMainnetValue ? "mainnet" : "devnet"
}`
);

const data = await response.json();
const data = await response.json();

if (!data.valid) {
if (!data.valid) {
searchFailed();
return;
}

selectSearch(data);
} catch (error) {
searchFailed();
return;
}

selectSearch(data);
} catch (error) {
searchFailed();
}
};
};

let isMainnetValue = true;

onMount(() => {
const params = new URLSearchParams(window.location.search);
const network = params.get("network");
if (network !== null) {
isMainnetValue = network === "mainnet";
}
recent = getRecentSearches();

isBackpack =
window?.localStorage?.getItem("walletAdapter") === '"Backpack"';
});

$: if ($walletStore.connected && !connected) {
focusInput();
const params = new URLSearchParams(window.location.search);
const network = params.get("network");
isMainnetValue = network !== "devnet";
inputValue = $walletStore.publicKey?.toBase58() || "";
addRecent({
address: inputValue,
search: inputValue,
type: "account",
url: `/account/${inputValue}?network=${
isMainnetValue ? "mainnet" : "devnet"
}`,
valid: true,
onMount(() => {
const params = new URLSearchParams(window.location.search);
const network = params.get("network");
if (network !== null) {
isMainnetValue = network === "mainnet";
}
recent = getRecentSearches();

isBackpack =
window?.localStorage?.getItem("walletAdapter") === '"Backpack"';
});

window.location.href = `/account/${inputValue}`;
$: if ($walletStore.connected && !connected) {
focusInput();
const params = new URLSearchParams(window.location.search);
const network = params.get("network");
isMainnetValue = network !== "devnet";
inputValue = $walletStore.publicKey?.toBase58() || "";
addRecent({
address: inputValue,
search: inputValue,
type: "account",
url: `/account/${inputValue}?network=${
isMainnetValue ? "mainnet" : "devnet"
}`,
valid: true,
});

window.location.href = `/account/${inputValue}`;

connected = true;
}
connected = true;
}
</script>

<div class="relative z-30 my-2 w-full">
Loading