Skip to content

Commit

Permalink
refactor demo as per updated package
Browse files Browse the repository at this point in the history
  • Loading branch information
Envoy-VC committed Dec 21, 2023
1 parent 0ac7af4 commit 535901e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 2 additions & 5 deletions apps/demo/src/components/common/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,7 @@ const Navbar = () => {

React.useEffect(() => {
const get = () => {
const toolkit = new AtomicToolkitWeb({
environment: 'mainnet',
useIrys: false,
});
const toolkit = new AtomicToolkitWeb({});
setAtomicToolkit(toolkit);
};

Expand All @@ -48,7 +45,7 @@ const Navbar = () => {
useAns
profileModal
accent='#fff'
className='ConnectBtn !border-2 !border-black !p-1 !text-black !text-xs sm:!text-[1rem]'
className='ConnectBtn !border-2 !border-black !p-1 !text-xs !text-black sm:!text-[1rem]'
/>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions apps/demo/src/sections/atomic-asset/license-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ const LicenseDetails = () => {
});

setModalOpen(true);

const tx = await atomicToolkit.createAtomicAsset(file as RcFile, opts);

const tx = await atomicToolkit.assets.createAtomicAsset(
file as RcFile,
opts
);
console.log(tx.contractTxId);
setTxId(tx.contractTxId);
setModalOpen(true);
Expand Down
4 changes: 2 additions & 2 deletions apps/demo/src/sections/collection/license/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const CollectionLicense = () => {
).split('/')[0] ?? 'asset';

const opts = getAtomicOpts(values, collection, index, assets.units, type);
return atomicToolkit.createAtomicAsset(file as RcFile, opts);
return atomicToolkit.assets.createAtomicAsset(file as RcFile, opts);
});

const txns = await Promise.all(promises);
Expand All @@ -114,7 +114,7 @@ const CollectionLicense = () => {
assetIds,
files,
});
const tx = await atomicToolkit.createCollection(opts);
const tx = await atomicToolkit.collection.createCollection(opts);
setTxId(tx.id);
toast.success('Successfully Created');
} catch (error) {
Expand Down

0 comments on commit 535901e

Please sign in to comment.