@flowtyio/flow-contracts 0.1.0-beta.17 → 0.1.0-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -90,7 +90,7 @@ access(all) contract ScopedFTProviders {
|
|
|
90
90
|
return self.canWithdraw(amount)
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
access(FungibleToken.Withdraw
|
|
93
|
+
access(FungibleToken.Withdraw) fun withdraw(amount: UFix64): @{FungibleToken.Vault} {
|
|
94
94
|
pre {
|
|
95
95
|
!self.isExpired(): "provider has expired"
|
|
96
96
|
}
|
|
@@ -126,4 +126,3 @@ access(all) contract ScopedFTProviders {
|
|
|
126
126
|
return <- create ScopedFTProvider(provider: provider, filters: filters, expiration: expiration)
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
|
|
@@ -78,7 +78,7 @@ access(all) contract ScopedNFTProviders {
|
|
|
78
78
|
//
|
|
79
79
|
// Wrapper around an NFT Provider that is restricted to specific ids.
|
|
80
80
|
access(all) resource ScopedNFTProvider: NonFungibleToken.Provider {
|
|
81
|
-
access(self) let provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.
|
|
81
|
+
access(self) let provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>
|
|
82
82
|
access(self) let filters: [{NFTFilter}]
|
|
83
83
|
|
|
84
84
|
// block timestamp that this provider can no longer be used after
|
|
@@ -91,7 +91,7 @@ access(all) contract ScopedNFTProviders {
|
|
|
91
91
|
return false
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
access(all) init(provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.
|
|
94
|
+
access(all) init(provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>, filters: [{NFTFilter}], expiration: UFix64?) {
|
|
95
95
|
self.provider = provider
|
|
96
96
|
self.expiration = expiration
|
|
97
97
|
self.filters = filters
|
|
@@ -157,10 +157,11 @@ access(all) contract ScopedNFTProviders {
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
access(all) fun createScopedNFTProvider(
|
|
160
|
-
provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.
|
|
160
|
+
provider: Capability<auth(NonFungibleToken.Withdraw) &{NonFungibleToken.Collection}>,
|
|
161
161
|
filters: [{NFTFilter}],
|
|
162
162
|
expiration: UFix64?
|
|
163
163
|
): @ScopedNFTProvider {
|
|
164
164
|
return <- create ScopedNFTProvider(provider: provider, filters: filters, expiration: expiration)
|
|
165
165
|
}
|
|
166
|
-
}
|
|
166
|
+
}
|
|
167
|
+
|