diff --git a/contracts/DropTypes.cdc b/contracts/DropTypes.cdc index a926694..bb15bde 100644 --- a/contracts/DropTypes.cdc +++ b/contracts/DropTypes.cdc @@ -203,8 +203,8 @@ access(all) contract DropTypes { } var royaltyRate = 0.0 - if let tmp = resolver!.resolveContractView(resourceType: nftType, viewType: Type()) { - let royalties = tmp as! MetadataViews.Royalties + if let tmpRoyalties = resolver!.resolveContractView(resourceType: nftType, viewType: Type()) { + let royalties = tmpRoyalties as! MetadataViews.Royalties for r in royalties.getRoyalties() { royaltyRate = royaltyRate + r.cut } @@ -276,8 +276,8 @@ access(all) contract DropTypes { } var royaltyRate = 0.0 - if let tmp = resolver!.resolveContractView(resourceType: nftType, viewType: Type()) { - let royalties = tmp as! MetadataViews.Royalties + if let tmpRoyalties = resolver!.resolveContractView(resourceType: nftType, viewType: Type()) { + let royalties = tmpRoyalties as! MetadataViews.Royalties for r in royalties.getRoyalties() { royaltyRate = royaltyRate + r.cut } diff --git a/contracts/nft/BaseCollection.cdc b/contracts/nft/BaseCollection.cdc index a14624a..aada599 100644 --- a/contracts/nft/BaseCollection.cdc +++ b/contracts/nft/BaseCollection.cdc @@ -82,22 +82,6 @@ access(all) contract interface BaseCollection: ViewResolver { ) case Type(): return FlowtyDrops.DropResolver(cap: acct.capabilities.get<&{FlowtyDrops.ContainerPublic}>(FlowtyDrops.ContainerPublicPath)) - case Type(): - let c = getAccount(addr).contracts.borrow<&{BaseCollection}>(name: segments[2])! - let tmp = c.MetadataCap.borrow() - if tmp == nil { - return nil - } - - return tmp!.collectionInfo.getDisplay() - case Type(): - let c = getAccount(addr).contracts.borrow<&{BaseCollection}>(name: segments[2])! - let tmp = c.MetadataCap.borrow() - if tmp == nil { - return nil - } - - return tmp!.collectionInfo.getDisplay() } // These views require the {BaseCollection} interface