Skip to content

Commit 19ddf0b

Browse files
authored
fix nft locker (#78)
* Create PackNFT_Golazos.cdc * Update PackNFT_Golazos.cdc * fix NFTLocker
1 parent 99516e9 commit 19ddf0b

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

locked-nft/contracts/NFTLocker.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ access(all) contract NFTLocker {
7979
/// Determine if NFT can be unlocked
8080
///
8181
access(all) view fun canUnlockToken(id: UInt64, nftType: Type): Bool {
82-
if let lockedTokens = NFTLocker.lockedTokens[nftType] {
82+
if let lockedTokens = &NFTLocker.lockedTokens[nftType] as &{UInt64: NFTLocker.LockedData}? {
8383
if let lockedToken = lockedTokens[id] {
8484
if lockedToken.lockedUntil <= UInt64(getCurrentBlock().timestamp) {
8585
return true

locked-nft/flow.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"source": "./contracts/NFTLocker.cdc",
2121
"aliases": {
2222
"emulator": "f8d6e0586b0a20c7",
23+
"mainnet": "b6f2481eba4df97b",
2324
"testnet": "ef4cd3d07a7b43ce"
2425
}
2526
},

locked-nft/lib/go/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.PHONY: test
22
test:
3-
go test ./...
3+
CGO_ENABLED=0 go test -tags=no_cgo ./...
44

55
.PHONY: ci
66
ci: test

0 commit comments

Comments
 (0)