diff --git a/.gitmodules b/.gitmodules index 9b6866c..6ff7c54 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "lib/forge-std"] path = lib/forge-std url = https://github.com/foundry-rs/forge-std -[submodule "lib/MultiToken"] - path = lib/MultiToken - url = https://github.com/PWNFinance/MultiToken [submodule "lib/openzeppelin-contracts"] path = lib/openzeppelin-contracts url = https://github.com/OpenZeppelin/openzeppelin-contracts +[submodule "lib/MultiToken"] + path = lib/MultiToken + url = https://github.com/PWNFinance/MultiToken diff --git a/lib/MultiToken b/lib/MultiToken index 991d699..92a9c2a 160000 --- a/lib/MultiToken +++ b/lib/MultiToken @@ -1 +1 @@ -Subproject commit 991d6996368ed2ff1190a70b2392beab4413e9c8 +Subproject commit 92a9c2a71f874ea9c614c30f87b8efbf14eba046 diff --git a/src/PWNVault.sol b/src/PWNVault.sol index 2cf3928..f0bb9b1 100644 --- a/src/PWNVault.sol +++ b/src/PWNVault.sol @@ -47,7 +47,7 @@ abstract contract PWNVault is IERC721Receiver, IERC1155Receiver { * @param beneficiary An address of the recipient of the asset - is set in the PWN logic contract */ function _push(MultiToken.Asset memory asset, address beneficiary) internal { - asset.transferAsset(beneficiary); + asset.safeTransferAssetFrom(address(this), beneficiary); emit VaultPush(asset, beneficiary); } @@ -64,7 +64,7 @@ abstract contract PWNVault is IERC721Receiver, IERC1155Receiver { */ function _pushFrom(MultiToken.Asset memory asset, address origin, address beneficiary, bytes memory permit) internal { _handlePermit(asset, origin, permit); - asset.transferAssetFrom(origin, beneficiary); + asset.safeTransferAssetFrom(origin, beneficiary); emit VaultPushFrom(asset, origin, beneficiary); }