diff --git a/docs/build/guides/mobile/react-native-quickstart.md b/docs/build/guides/mobile/react-native-quickstart.md index a6f0ba2497..2d41f23dc2 100644 --- a/docs/build/guides/mobile/react-native-quickstart.md +++ b/docs/build/guides/mobile/react-native-quickstart.md @@ -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) @@ -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!")) diff --git a/docs/tools/clients/unity-sdk/samples/nft-example.md b/docs/tools/clients/unity-sdk/samples/nft-example.md index 3badfc3ebd..6deb513a6b 100644 --- a/docs/tools/clients/unity-sdk/samples/nft-example.md +++ b/docs/tools/clients/unity-sdk/samples/nft-example.md @@ -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 {} } diff --git a/docs/tools/flow-dev-wallet/index.md b/docs/tools/flow-dev-wallet/index.md index 740d0cc398..7e658f2fca 100644 --- a/docs/tools/flow-dev-wallet/index.md +++ b/docs/tools/flow-dev-wallet/index.md @@ -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()!