# Sell kittyItems transaction failed

**URL:** <https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470>\
**Category:** 🏄🏻‍♀️ Cadence\
**Created:** [October 19, 2021, 9:18am UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470 "2021-10-19T09:18:02Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylv1un](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sylv1un](https://forum.flow.com/u/sylv1un)\
**Post date:** [October 19, 2021, 9:18am UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/1 "2021-10-19T09:18:02Z")

</div>

Hi,  
I run the kittyItems project ([https://github.com/onflow/kitty-items](https://github.com/onflow/kitty-items)) on flow emulator, I deployed all the contracts on “account-emulator” and I created another account on which I setup a vault fusd, I minted fusd on it, and I minted also an NFT on it. Now I want to put this NFT on marketplace “nftStorefront” but when I run the transaction sell\_item\_fusd.cdc, I obtain this error :  
`flow transactions send ./cadence/transactions/nftStorefront/sell_item_fusd.cdc --signer account_with_nft --arg UInt64:1 --arg UFix64:10.0`

```
❌ Transaction Error 
execution error code 1101: [Error Code: 1101] cadence runtime error Execution failed:
error: assertion failed: Missing or mis-typed Kibble receiver
  --> 315c8626083fb38520b4e51c5027cf40be8c943e9d5917b16ee826f56cc76769:19:8
   |
19 | assert(self.fusdReceiver.borrow() != nil, message: "Missing or mis-typed Kibble receiver")
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

```

the code sell\_item\_fusd.cdc :  
import FungibleToken from “…/…/contracts/FungibleToken.cdc”  
import NonFungibleToken from “…/…/contracts/NonFungibleToken.cdc”  
import FUSD from “…/…/contracts/FUSD.cdc”  
import KittyItems from “…/…/contracts/KittyItems.cdc”  
import NFTStorefront from “…/…/contracts/NFTStorefront.cdc”

```
transaction(saleItemID: UInt64, saleItemPrice: UFix64) {

    let fusdReceiver: Capability<&FUSD.Vault{FungibleToken.Receiver}>
    let kittyItemsProvider: Capability<&KittyItems.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>
    let storefront: &NFTStorefront.Storefront

    prepare(account: AuthAccount) {
        // We need a provider capability, but one is not provided by default so we create one if needed.
        let kittyItemsCollectionProviderPrivatePath = /private/kittyItemsCollectionProvider

        self.fusdReceiver = account.getCapability<&FUSD.Vault{FungibleToken.Receiver}>(/public/fusdReciever)!
        
        assert(self.fusdReceiver.borrow() != nil, message: "Missing or mis-typed Kibble receiver")

        if !account.getCapability<&KittyItems.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(kittyItemsCollectionProviderPrivatePath)!.check() {
            account.link<&KittyItems.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(kittyItemsCollectionProviderPrivatePath, target: KittyItems.CollectionStoragePath)
        }

        self.kittyItemsProvider = account.getCapability<&KittyItems.Collection{NonFungibleToken.Provider, NonFungibleToken.CollectionPublic}>(kittyItemsCollectionProviderPrivatePath)!
        
        assert(self.kittyItemsProvider.borrow() != nil, message: "Missing or mis-typed KittyItems.Collection provider")

        self.storefront = account.borrow<&NFTStorefront.Storefront>(from: NFTStorefront.StorefrontStoragePath)
            ?? panic("Missing or mis-typed NFTStorefront Storefront")
    }

    execute {
        let saleCut = NFTStorefront.SaleCut(
            receiver: self.fusdReceiver,
            amount: saleItemPrice
        )
        self.storefront.createSaleOffer(
            nftProviderCapability: self.kittyItemsProvider,
            nftType: Type<@KittyItems.NFT>(),
            nftID: saleItemID,
            salePaymentVaultType: Type<@FUSD.Vault>(),
            saleCuts: [saleCut]
        )
    }
}

```

I don’t know what this assert because I have a fusd vault on the account receiver. I have 30 fusd on it.  
Have you an idea ?  
Thanks for your help

---

<div class="post-metadata">

**Author:** ![sylv1un](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sylv1un](https://forum.flow.com/u/sylv1un)\
**Post date:** [October 19, 2021, 10:38am UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/2 "2021-10-19T10:38:02Z")

</div>

OK, I’ve got it !! I have been looking for a long time and finally it is a smalllllll error

In the transaction code : self.fusdReceiver = account.getCapability\<&FUSD.Vault{FungibleToken.Receiver}\>(/public/fusdReciever)!

/public/fusdReciever instead of /public/fusdReceiver

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [October 19, 2021, 2:06pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/3 "2021-10-19T14:06:36Z")

</div>

Glad you were able to figure it out! Feel free to ask any other questions. 🙂

---

<div class="post-metadata">

**Author:** ![Mackenzie](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mackenzie](https://forum.flow.com/u/Mackenzie)\
**Post date:** [October 21, 2021, 6:59pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/4 "2021-10-21T18:59:02Z")

</div>

Awesome, was this a typo in the example code?

---

<div class="post-metadata">

**Author:** ![sylv1un](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@sylv1un](https://forum.flow.com/u/sylv1un)\
**Post date:** [October 21, 2021, 7:58pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/5 "2021-10-21T19:58:05Z")

</div>

Yes this is a typo in the example code.  
You can see this typo again :

> <https://github.com/onflow/kitty-items/blob/master/cadence/transactions/nftStorefront/sell_item_fusd.cdc>

at the line 17

---

<div class="post-metadata">

**Author:** ![Mackenzie](https://avatars.discourse-cdn.com/v4/letter/m/3da27b/32.png) [@Mackenzie](https://forum.flow.com/u/Mackenzie)\
**Post date:** [October 21, 2021, 8:22pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/6 "2021-10-21T20:22:30Z")

</div>

Fixed here:

> <https://github.com/onflow/kitty-items/commit/08349072d8779722b3bebb099e076478f1b7711e>

---

<div class="post-metadata">

**Author:** ![deviant\_0](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@deviant\_0](https://forum.flow.com/u/deviant_0)\
**Post date:** [December 26, 2021, 1:43pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/7 "2021-12-26T13:43:21Z")

</div>

Hi people!  
I`ve got the same error, and i see that typo in transaction code, but can anybody explain how to fix that? I`m trying to put on sale an item at Rarible Flow

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [January 3, 2022, 5:10pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/8 "2022-01-03T17:10:15Z")

</div>

Check out the PR that Mackenzie made. Just change the spelling of receiver in the path name. 🙂

> <https://github.com/onflow/kitty-items/commit/08349072d8779722b3bebb099e076478f1b7711e>

---

<div class="post-metadata">

**Author:** ![deviant\_0](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@deviant\_0](https://forum.flow.com/u/deviant_0)\
**Post date:** [January 14, 2022, 6:37pm UTC](https://forum.flow.com/t/sell-kittyitems-transaction-failed/2470/9 "2022-01-14T18:37:07Z")

</div>

yeah  
but do we talking about flow emulator or about real Flow on the Rarible?  
i can`t see the option “edit transaction”(
