Skip to content

Commit

Permalink
address PR syntax comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Oct 1, 2024
1 parent 8e857c6 commit 44c7c2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/build/guides/mobile/react-native-quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ export default function App() {
// Only initialize the account if it hasn't already been initialized
if (!Profile.check(account.address)) {
// This creates and stores the profile in the user's account
account.save(<- Profile.new(), to: Profile.privatePath)
account.storage.save(<- Profile.new(), to: Profile.storagePath)
// This creates the public capability that lets applications read the profile's info
let newCap = account.capabilities.storage.issue<&Profile.Base>(Profile.privatePath)
Expand Down Expand Up @@ -561,7 +561,7 @@ export default function App() {
transaction(name: String) {
prepare(account: auth(BorrowValue) &Account) {
let profileRef = account.borrow<&Profile.Base>(from: Profile.privatePath)
let profileRef = account.storage.borrow<&Profile.Base>(from: Profile.privatePath)
?? panic("The signer does not store a Profile.Base object at the path "
.concat(Profile.privatePath.toString())
.concat(". The signer must initialize their account with this object first!"))
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/clients/unity-sdk/samples/nft-example.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ access(all) fun main(addr:Address): {UInt64:{String:String}} {
//Get a capability to the SDKExampleNFT collection if it exists. Return an empty dictionary if it does not
let collectionCap = getAccount(addr).capabilities.get<&{SDKExampleNFT.CollectionPublic}>(SDKExampleNFT.CollectionPublicPath)
if(collectionCap == nil)
if(!collectionCap.check())
{
return {}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/flow-dev-wallet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ access(all) fun main(address: Address): UFix64 {
.capabilities.get
<&LockedTokens.TokenHolder>
(LockedTokens.LockedAccountInfoPublicPath)
if lockedAccountInfoCap == nil || !(lockedAccountInfoCap!.check()) {
if !(lockedAccountInfoCap!.check()) {
return unlockedBalance
}
let lockedAccountInfoRef = lockedAccountInfoCap!.borrow()!
Expand Down

0 comments on commit 44c7c2c

Please sign in to comment.