Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@matrix-labs/matrix-storefront-sdk

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matrix-labs/matrix-storefront-sdk - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

17

dist/cadence/create_list.js

@@ -14,3 +14,3 @@ "use strict";

let NFTProvider: Capability<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>
let NFTProvider: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>

@@ -22,12 +22,7 @@ let tokenReceiver: Capability<&{FungibleToken.Receiver}>

// borrow Storefront resource
self.storefront = acct.borrow<&NFTStorefront.Storefront>(from: NFTStorefront.StorefrontPublicPath) ?? panic("can't borrow storefront")
self.storefront = acct.borrow<&NFTStorefront.Storefront>(from: NFTStorefront.StorefrontStoragePath) ?? panic("can't borrow storefront")
// to access 0xsupportedNFTName
if acct.getCapability<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(0xsupportedNFTName.CollectionPublicPath).check() == false {
acct.link<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(0xsupportedNFTName.CollectionPublicPath, target: 0xsupportedNFTName.CollectionStoragePath)
}
self.NFTProvider = acct.getCapability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(MatrixMarketplaceNFT.CollectionPublicPath)!
assert(self.NFTProvider.borrow() != nil, message: "Missing or mis-typed MatrixMarketplaceNFT.Collection provider")
self.NFTProvider = acct.getCapability<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(0xsupportedNFTName.CollectionPublicPath)!
assert(self.NFTProvider.borrow() != nil, message: "Missing or mis-typed 0xsupportedNFTName.Collection provider")
// receiver flowtoken after NFT sold

@@ -49,4 +44,4 @@ self.tokenReceiver = acct.getCapability<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!

saleCuts.append(NFTStorefront.SaleCut(
receiver: royaltyReceivers[size],
amount: royaltyMount[size]
receiver: getAccount(royaltyReceivers[size-1]).getCapability<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!,
amount: royaltyMount[size-1]
))

@@ -53,0 +48,0 @@ size = size - 1

{
"name": "@matrix-labs/matrix-storefront-sdk",
"version": "0.0.6",
"version": "0.0.7",
"main": "./dist/index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -11,3 +11,3 @@ export const createListingScript: string = `

let NFTProvider: Capability<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>
let NFTProvider: Capability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>

@@ -19,12 +19,7 @@ let tokenReceiver: Capability<&{FungibleToken.Receiver}>

// borrow Storefront resource
self.storefront = acct.borrow<&NFTStorefront.Storefront>(from: NFTStorefront.StorefrontPublicPath) ?? panic("can't borrow storefront")
self.storefront = acct.borrow<&NFTStorefront.Storefront>(from: NFTStorefront.StorefrontStoragePath) ?? panic("can't borrow storefront")
// to access 0xsupportedNFTName
if acct.getCapability<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(0xsupportedNFTName.CollectionPublicPath).check() == false {
acct.link<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(0xsupportedNFTName.CollectionPublicPath, target: 0xsupportedNFTName.CollectionStoragePath)
}
self.NFTProvider = acct.getCapability<&{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(MatrixMarketplaceNFT.CollectionPublicPath)!
assert(self.NFTProvider.borrow() != nil, message: "Missing or mis-typed MatrixMarketplaceNFT.Collection provider")
self.NFTProvider = acct.getCapability<&0xsupportedNFTName.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(0xsupportedNFTName.CollectionPublicPath)!
assert(self.NFTProvider.borrow() != nil, message: "Missing or mis-typed 0xsupportedNFTName.Collection provider")
// receiver flowtoken after NFT sold

@@ -46,4 +41,4 @@ self.tokenReceiver = acct.getCapability<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!

saleCuts.append(NFTStorefront.SaleCut(
receiver: royaltyReceivers[size],
amount: royaltyMount[size]
receiver: getAccount(royaltyReceivers[size-1]).getCapability<&{FungibleToken.Receiver}>(/public/flowTokenReceiver)!,
amount: royaltyMount[size-1]
))

@@ -63,2 +58,2 @@ size = size - 1

}
}`
}`;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc