Skip to content

Commit 9d394f7

Browse files
committed
UI Done
1 parent f8e9983 commit 9d394f7

File tree

17 files changed

+370
-134
lines changed

17 files changed

+370
-134
lines changed

.github/workflows/basic.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Srtool build
2+
3+
on: push
4+
5+
jobs:
6+
srtool:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
chain: ["asset-hub-kusama", "asset-hub-westend"]
11+
steps:
12+
- uses: actions/checkout@v3
13+
- name: Srtool build
14+
id: srtool_build
15+
uses: chevdor/srtool-actions@v0.8.0
16+
with:
17+
chain: ${{ matrix.chain }}
18+
runtime_dir: polkadot-parachains/${{ matrix.chain }}-runtime
19+
- name: Summary
20+
run: |
21+
echo '${{ steps.srtool_build.outputs.json }}' | jq . > ${{ matrix.chain }}-srtool-digest.json
22+
cat ${{ matrix.chain }}-srtool-digest.json
23+
echo "Runtime location: ${{ steps.srtool_build.outputs.wasm }}"

Cargo.lock

Lines changed: 99 additions & 114 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ members = [
1414
resolver = "2"
1515

1616
[workspace.dependencies]
17-
solochain-template-runtime = { path = "./runtime", default-features = false }
18-
pallet-template = { path = "./pallets/template", default-features = false }
17+
solochain-template-runtime = { path = "./runtime", default-features = false, package="Polkadot-NFT-Farcaster-Frames-Runtime" }
18+
pallet-template = { path = "./pallets/template", default-features = false, package="pallet-nft-farcaster-frames" }
1919
clap = { version = "4.5.13" }
2020
frame-benchmarking-cli = { version = "46.0.0", default-features = false }
2121
frame-metadata-hash-extension = { version = "0.7.0", default-features = false }
@@ -72,5 +72,4 @@ sp-storage = { version = "22.0.0", default-features = false }
7272
sp-transaction-pool = { version = "35.0.0", default-features = false }
7373
sp-version = { version = "38.0.0", default-features = false }
7474
substrate-wasm-builder = { version = "25.0.0", default-features = false }
75-
sp-std = { version = "14.0.0", default-features = false }
76-
pallet-farcaster_frame = { version = "0.0.5", default-features = false}
75+
sp-std = { version = "14.0.0", default-features = false }

chain_spec.json

Lines changed: 40 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"accountAssociation": {
3+
"header": "eyJmaWQiOjQwMDcxMywidHlwZSI6ImN1c3RvZHkiLCJrZXkiOiIweDFkNDAxYTUyMzcxOWM1OGFhN2JhYTIzYjYxNTg3YzEyMGJkZDgxY2YifQ",
4+
"payload": "eyJkb21haW4iOiJsb2NhbGhvc3Q6MzAwMCJ9",
5+
"signature": ""
6+
},
7+
"frame": {
8+
"name": "Polkadot NFT Demo",
9+
"version": "1",
10+
"iconUrl": "http://localhost:3000/icon.png",
11+
"homeUrl": "http://localhost:3000",
12+
"imageUrl": "http://localhost:3000/image.png",
13+
"buttonTitle": "Polkadot NFT",
14+
"splashImageUrl": "http://localhost:3000/splash.png",
15+
"splashBackgroundColor": "#000",
16+
"webhookUrl": "http://localhost:3000/api/webhook"
17+
}
18+
}

frontend/src/components/CollectionManager.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface Collection {
2828
interface NFTData {
2929
owner: string;
3030
metadata: string;
31-
is_sold: boolean;
31+
isSold: boolean;
3232
}
3333

3434
interface CollectionData {
@@ -47,7 +47,7 @@ interface NFT {
4747
image: string;
4848
};
4949
owner: string;
50-
is_sold: boolean;
50+
isSold: boolean;
5151
}
5252

5353
export const CollectionManager: React.FC<CollectionManagerProps> = ({
@@ -169,7 +169,7 @@ export const CollectionManager: React.FC<CollectionManagerProps> = ({
169169
id: itemId,
170170
metadata,
171171
owner: nftData.owner,
172-
is_sold: nftData.is_sold,
172+
isSold: nftData.isSold,
173173
};
174174
} catch (error) {
175175
console.error(
@@ -382,7 +382,7 @@ export const CollectionManager: React.FC<CollectionManagerProps> = ({
382382
</p>
383383
<p className="text-xs text-gray-500">
384384
Status:{" "}
385-
{!nft.is_sold
385+
{!nft.isSold
386386
? "Sold"
387387
: "Available"}
388388
</p>

frontend/src/components/Demo.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ export const Demo: React.FC<DemoProps> = ({ setConnectModalOpen }) => {
4141
toast.error(walletError.message);
4242
}
4343
}, [walletError]);
44+
45+
if (!isSDKLoaded) {
46+
return (
47+
<div className="min-h-[calc(100vh-4rem)] flex items-center justify-center">
48+
<div className="text-center">
49+
<h2 className="text-3xl font-bold text-gray-900 mb-4">
50+
Loading...
51+
</h2>
52+
<p className="text-gray-600">
53+
Please wait while we load the SDK
54+
</p>
55+
</div>
56+
</div>
57+
);
58+
}
59+
4460
if (!selectedWallet) {
4561
return (
4662
<div className="min-h-[calc(100vh-4rem)] flex items-center justify-center">

frontend/src/components/NFTMarketplace.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ export const NFTMarketplace: React.FC<NFTMarketplaceProps> = ({
237237
</div>
238238
<div className="p-4">
239239
<h3 className="text-lg font-semibold text-gray-900 mb-2">
240-
{`${nft.metadata.title} ${nft.isSold}` ||
240+
{`${nft.metadata.title}` ||
241241
`NFT #${nft.id}`}
242242
</h3>
243243
<p className="text-sm text-gray-600 mb-4">

frontend/src/components/PolkadotProvider.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export default function Provider({ children }: { children: React.ReactNode }) {
7272
);
7373
const walletAggregator = new WalletAggregator([
7474
injectedWalletProvider,
75-
// walletConnectProvider,
75+
walletConnectProvider,
7676
]);
7777

7878
return (

frontend/src/components/UserDashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const UserDashboard: React.FC<UserDashboardProps> = ({
160160
</div>
161161
<div className="p-4">
162162
<h3 className="text-lg font-semibold text-gray-900 mb-2">
163-
{`${nft.metadata.title} ${nft.isSold}` ||
163+
{`${nft.metadata.title}` ||
164164
`NFT #${nft.id}`}
165165
</h3>
166166
<p className="text-sm text-gray-600 mb-4">

0 commit comments

Comments
 (0)