Skip to content

Commit

Permalink
Merge branch 'main' into deewai/dont-panic-if-entry-doesnt-exist
Browse files Browse the repository at this point in the history
  • Loading branch information
Deewai authored Oct 2, 2024
2 parents 57674f8 + 19ddf0b commit 28d79d3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion locked-nft/contracts/NFTLocker.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ access(all) contract NFTLocker {
/// Determine if NFT can be unlocked
///
access(all) view fun canUnlockToken(id: UInt64, nftType: Type): Bool {
if let lockedTokens = NFTLocker.lockedTokens[nftType] {
if let lockedTokens = &NFTLocker.lockedTokens[nftType] as &{UInt64: NFTLocker.LockedData}? {
if let lockedToken = lockedTokens[id] {
if lockedToken.lockedUntil <= UInt64(getCurrentBlock().timestamp) {
return true
Expand Down
1 change: 1 addition & 0 deletions locked-nft/flow.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"source": "./contracts/NFTLocker.cdc",
"aliases": {
"emulator": "f8d6e0586b0a20c7",
"mainnet": "b6f2481eba4df97b",
"testnet": "ef4cd3d07a7b43ce"
}
},
Expand Down
2 changes: 1 addition & 1 deletion locked-nft/lib/go/test/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: test
test:
go test ./...
CGO_ENABLED=0 go test -tags=no_cgo ./...

.PHONY: ci
ci: test

0 comments on commit 28d79d3

Please sign in to comment.