Suppose I have a smart-contract which at some call needs to transfer certain amount of money from my wallet.
do I need to pass specific coin object to such entry function, not only amount (especially if it is custom coin, not “SUI”)
or in other words, can smart-contract just browse my wallet and pick suitable number of coins to make the required amount (probably splitting the last of them)
So you mean I should anyway merge coins manually - either in the smart-contract itself or before it, by some different service or contract?
My initial idea was that there may be some magic method which can browse coins in owner’s address, but seemingly no such magic exists at this point (perhaps even not going to in future), right?
This makes sense if you already know all the respective coin object IDs, but if for example i want to check the coin balance of a user’s address and that address happens to have 50 coin objects it becomes very tiring to do this on the contract level
Yep, that’s true. Even if it is a single coin, not 50, to deal with one’s money one needs not only wallet id (and coin name), but specific id of the coin. Not very convenient in some situations.