From 90ba66f18d39469795d6419561e1eb7d383e38f4 Mon Sep 17 00:00:00 2001 From: Austin Kline Date: Tue, 27 Aug 2024 18:01:35 -0700 Subject: [PATCH] sync Router --- contracts/fungible-token-router/FungibleTokenRouter.cdc | 4 +--- package.json | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/contracts/fungible-token-router/FungibleTokenRouter.cdc b/contracts/fungible-token-router/FungibleTokenRouter.cdc index 4ed7af4..63fc0b1 100644 --- a/contracts/fungible-token-router/FungibleTokenRouter.cdc +++ b/contracts/fungible-token-router/FungibleTokenRouter.cdc @@ -65,14 +65,12 @@ access(all) contract FungibleTokenRouter { vaultDataOpt = md as! FungibleTokenMetadataViews.FTVaultData } - let vaultData = vaultDataOpt ?? panic("vault data could not be retrieved") + let vaultData = vaultDataOpt ?? panic("vault data could not be retrieved for type ".concat(tokenType.identifier)) let receiver = getAccount(destination).capabilities.get<&{FungibleToken.Receiver}>(vaultData.receiverPath) assert(receiver.check(), message: "no receiver found at path: ".concat(vaultData.receiverPath.toString())) emit TokensRouted(tokenType: tokenType.identifier, amount: from.balance, to: destination) receiver.borrow()!.deposit(from: <-from) - - panic("Could not find FungibleTokenMetadataViews.FTVaultData on depositing tokens") } access(all) view fun getSupportedVaultTypes(): {Type: Bool} { diff --git a/package.json b/package.json index 606575b..4bb9584 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flowtyio/flow-contracts", - "version": "0.1.0-beta.30", + "version": "0.1.0-beta.31", "main": "index.json", "description": "An NPM package for common flow contracts", "author": "flowtyio",