Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a9744cb
chore: handleSuiAllowances function added
Caglankaan Oct 20, 2025
256dd35
chore: added slush wallet integration
Caglankaan Oct 22, 2025
c4d673e
chore: added approvalstep for sui
Caglankaan Oct 22, 2025
d264059
chore: added submitstep for sui
Caglankaan Oct 22, 2025
1de72f6
chore: added lib/services for sui client & balances
Caglankaan Oct 22, 2025
9d778fa
chore: added transfer-ucs03 for sui
Caglankaan Oct 22, 2025
6b89e4e
chore: filling/* parts are added for sui
Caglankaan Oct 23, 2025
fe44b14
chore: placeholder slusher svg for now
Caglankaan Oct 23, 2025
7e4d2b5
chore: added fee related files
Caglankaan Oct 29, 2025
b07b7e6
chore: made union->sui work (at least on ui buttons)
Caglankaan Oct 29, 2025
079079b
chore: updates
Caglankaan Oct 29, 2025
313163f
chore: fixed the display issue
Caglankaan Oct 30, 2025
c28a664
chore: removed relayStoreId & getting it from port
Caglankaan Oct 30, 2025
da93d22
chore: added new constants
Caglankaan Oct 30, 2025
e505361
chore: sui->union testing the transfers WIP- wallet issues
Caglankaan Oct 30, 2025
4a2a766
chore: wallet issue
Caglankaan Oct 31, 2025
c768a28
chore: final working code -- issue with hubble/wallet
Caglankaan Oct 31, 2025
8f488a6
feat(ts-sdk-sui,app2): add native_denom
ehegnes Oct 31, 2025
351a1e1
chore: fixed the wallet refresh issue
Caglankaan Oct 31, 2025
5759f5b
chore: added rpc to wallet store for sui
Caglankaan Nov 3, 2025
a2a987a
chore: added new consts for sui metadata
Caglankaan Nov 4, 2025
fc14c92
chore: finalizing latest changes
Caglankaan Nov 4, 2025
8322330
chore: nix-fmt applied
Caglankaan Nov 4, 2025
73d3d13
chore: fixed app2.nix
Caglankaan Nov 4, 2025
ba31808
chore: fixed the export issue
Caglankaan Nov 4, 2025
ad3720b
chore: fixed other issues
Caglankaan Nov 4, 2025
bb39d7a
chore: fixed priceoracle issue
Caglankaan Nov 4, 2025
f16e021
chore: fixing docs
Caglankaan Nov 4, 2025
7b7eb8e
chore: trying to fix cli errors
Caglankaan Nov 4, 2025
e5de337
chore: fixed cli issues
Caglankaan Nov 4, 2025
23ea547
chore: bunch more sui changes
aeryz Nov 12, 2025
6403d37
chore(sui): pnpm hash stuff
aeryz Nov 18, 2025
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: 2 additions & 2 deletions app2/app2.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ _: {
../ts-sdk-evm
../ts-sdk-sui
];
hash = "sha256-6n4Co3CIVrmjbG4/bCLEBJi+doAB+u24x5C79WiA180=";
hash = "sha256-muTjcrxyASfVYRIClyU4Z+ZyCwlFTNkw9UnVWOBEhGA=";
buildInputs = deps;
nativeBuildInputs = buildInputs;
pnpmWorkspaces = [
Expand Down Expand Up @@ -135,7 +135,7 @@ _: {
text = ''
${ensureAtRepositoryRoot}
cd app2/
pnpm dlx gql.tada generate-schema --tsconfig ./tsconfig.json --output "./src/generated/schema.graphql" "https://orion.james.union.build/v1/graphql"
pnpm dlx gql.tada generate-schema --tsconfig ./tsconfig.json --output "./src/generated/schema.graphql" "https://development.graphql.union.build/v1/graphql"
pnpm dlx gql.tada generate-output --disable-preprocessing --tsconfig ./tsconfig.json --output ./src/generated/graphql-env.d.ts
'';
};
Expand Down
2 changes: 2 additions & 0 deletions app2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
"@eslint/js": "^9.24.0",
"@keplr-wallet/types": "^0.12.220",
"@leapwallet/types": "^0.0.5",
"@mysten/sui": "^1.38.0",
"@mysten/wallet-standard": "^0.19.3",
"@number-flow/svelte": "^0.3.7",
"@safe-global/safe-apps-sdk": "^9.1.0",
"@safe-global/safe-gateway-typescript-sdk": "^3.23.1",
Expand Down
15 changes: 10 additions & 5 deletions app2/src/generated/graphql-env.d.ts

Large diffs are not rendered by default.

123 changes: 123 additions & 0 deletions app2/src/generated/schema.graphql

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions app2/src/lib/components/ui/ConnectWalletButton.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ import Button from "./Button.svelte"
title="Cosmos"
>
</div>
<div
class="{Option.isSome(wallets.suiAddress) ? 'pulse-3 bg-green-500 shadow-[0_0_2px_1px_rgba(34,197,94,0.6)]' : 'bg-zinc-800'} w-2 h-2 rounded-full transition-colors duration-200"
title="Sui"
>
</div>
</div>
</Button>

Expand Down
2 changes: 2 additions & 0 deletions app2/src/lib/components/ui/Wallet/connect/connection.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import SharpPowerIcon from "$lib/components/icons/SharpPowerIcon.svelte"
import { type CosmosWalletId } from "$lib/wallet/cosmos"
import { type EvmWalletId } from "$lib/wallet/evm"
import { type SuiWalletId } from "$lib/wallet/sui"
import { RpcType } from "@unionlabs/sdk/schema"
import type { State } from "@wagmi/core"
import { Schema } from "effect"
Expand All @@ -27,6 +28,7 @@ interface Props {
connectedWalletId?:
| (T extends "cosmos" ? CosmosWalletId
: T extends "evm" ? EvmWalletId
: T extends "sui" ? SuiWalletId
: never)
| undefined
| null
Expand Down
2 changes: 2 additions & 0 deletions app2/src/lib/components/ui/Wallet/connect/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { CosmosWalletId } from "$lib/wallet/cosmos"
import type { EvmWalletId } from "$lib/wallet/evm"
import type { SuiWalletId } from "$lib/wallet/sui"
import type { RpcType } from "@unionlabs/sdk/schema"
import type { State } from "@wagmi/core"
import type { Schema } from "effect"
Expand All @@ -21,6 +22,7 @@ type Props<TChain extends Chain = Chain> = {
connectedWalletId?:
| (TChain extends "cosmos" ? CosmosWalletId
: TChain extends "evm" ? EvmWalletId
: TChain extends "sui" ? SuiWalletId
: never)
| undefined
onConnectClick: (walletIdentifier: string) => void | Promise<void>
Expand Down
55 changes: 51 additions & 4 deletions app2/src/lib/components/ui/Wallet/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@ import { dashboard } from "$lib/dashboard/stores/user.svelte"
import { uiStore } from "$lib/stores/ui.svelte"
import { cosmosStore, cosmosWalletsInformation } from "$lib/wallet/cosmos/index.js"
import { evmWalletsInformation, sepoliaStore } from "$lib/wallet/evm/index.js"
import { suiStore, suiWalletsInformation } from "$lib/wallet/sui"
import { Option } from "effect"
import Modal from "../Modal.svelte"

let currentWalletType = $state("all")

let evmConnected = $state(false)
let cosmosConnected = $state(false)
let suiConnected = $state(false)

$effect(() => {
evmConnected = sepoliaStore.connectionStatus === "connected"
cosmosConnected = cosmosStore.connectionStatus === "connected"
suiConnected = suiStore.connectionStatus === "connected"
})
</script>

Expand Down Expand Up @@ -43,10 +46,12 @@ $effect(() => {
style:left={currentWalletType === "all"
? "0"
: currentWalletType === "evm"
? "33.333%"
: "66.666%"}
style:width="33.333%"
style:height="100%"
? "25%"
: currentWalletType === "cosmos"
? "50%"
: "75%"}
style:width="25%"
style:height="75%"
>
</div>
<button
Expand Down Expand Up @@ -102,6 +107,27 @@ $effect(() => {
</span>
</div>
</button>
<button
onclick={() => currentWalletType = "sui"}
class="
flex-1 px-4 py-2 text-sm font-medium rounded-md transition-colors relative cursor-pointer
{currentWalletType === 'sui'
? 'text-zinc-900 dark:text-white'
: 'text-zinc-500 hover:text-zinc-900 dark:hover:text-white'}
"
>
<div class="flex items-center justify-center gap-2">
<span>Sui</span>
<span
class="
w-1.5 h-1.5 rounded-full transition-all duration-300 ring-1 ring-opacity-20 {suiConnected
? 'bg-green-500 animate-pulse ring-green-500 shadow-[0_0_6px_0px_rgba(34,197,94,0.6)]'
: 'bg-white/10 dark:bg-white/5 backdrop-blur-sm ring-white/20'}
"
>
</span>
</div>
</button>
</nav>
</section>

Expand All @@ -128,6 +154,17 @@ $effect(() => {
onDisconnectClick={cosmosStore.disconnect}
showDivider={false}
/>
{:else if currentWalletType === "sui"}
<Connection
chain="sui"
address={suiStore.address}
chainWalletsInformation={suiWalletsInformation}
connectStatus={suiStore.connectionStatus}
connectedWalletId={suiStore.connectedWallet}
onConnectClick={(id: string) => suiStore.connect(id as any)}
onDisconnectClick={suiStore.disconnect}
showDivider={false}
/>
{:else if currentWalletType === "all"}
<Connection
chain="evm"
Expand All @@ -149,6 +186,16 @@ $effect(() => {
onDisconnectClick={cosmosStore.disconnect}
showDivider={true}
/>
<Connection
chain="sui"
address={suiStore.address}
chainWalletsInformation={suiWalletsInformation}
connectStatus={suiStore.connectionStatus}
connectedWalletId={suiStore.connectedWallet}
onConnectClick={(id: string) => suiStore.connect(id as any)}
onDisconnectClick={suiStore.disconnect}
showDivider={false}
/>
{/if}
</section>
</Modal>
29 changes: 29 additions & 0 deletions app2/src/lib/gasprice/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,35 @@ export class GasPriceMap extends LayerMap.Service<GasPriceMap>()("GasPriceByChai
}),
),
),
Match.when(
{ rpc_type: "sui" },
(chain) =>
Layer.effect(
GasPrice.GasPrice,
Effect.gen(function*() {
// ── MOCKED SUI GAS PRICE ─────────────────────────────────────────────
// TODO: Change it later.
const of = Effect.gen(function*() {
const atomic = BigDecimal.unsafeFromNumber(1_000)
const value = GasPrice.AtomicGasPrice(atomic)

yield* Effect.logDebug(
`${chain.display_name} gas price (mock MIST): ${JSON.stringify(atomic)}`,
)

return {
value,
minimalDenom: "MIST",
denom: "SUI",
additiveFee: O.none(),
decimals: 9,
}
}).pipe(Effect.tapError((cause) => Effect.logError("GasPrice.of (sui)", cause)))

return GasPrice.GasPrice.of({ of })
}),
),
),
Match.orElseAbsurd,
),
idleTimeToLive: "30 seconds",
Expand Down
Loading