<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Lloyd A. Ramos</title>
    <description>The latest articles on DEV Community by Lloyd A. Ramos (@laronlineworld).</description>
    <link>https://dev.to/laronlineworld</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1114387%2Ff409e9d4-ae10-4091-9e27-899626b5e40a.png</url>
      <title>DEV Community: Lloyd A. Ramos</title>
      <link>https://dev.to/laronlineworld</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laronlineworld"/>
    <language>en</language>
    <item>
      <title>Tiktok Login/Signup webview</title>
      <dc:creator>Lloyd A. Ramos</dc:creator>
      <pubDate>Mon, 18 Dec 2023 01:26:38 +0000</pubDate>
      <link>https://dev.to/laronlineworld/tiktok-loginsignup-webview-1359</link>
      <guid>https://dev.to/laronlineworld/tiktok-loginsignup-webview-1359</guid>
      <description>&lt;p&gt;Hi All, Can I ask if somebody tried to create a work around with tiktok login via a webview. We all know that google restricted the login/signup via webview. &lt;/p&gt;

&lt;p&gt;I have this app that used tiktok login/signup. Also this app is made with bubble.io. So basicall it is a web app. Now I wrapped it to form ask native using webview.&lt;/p&gt;

&lt;p&gt;The problem is both android and ios. The login using tiktok via google account, twitter, ig etc is not working. I think that issues is under tiktok. Or do I need to setup my wrapped web app to android/ios config for login?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>android</category>
      <category>webdev</category>
      <category>ios</category>
    </item>
    <item>
      <title>How to call a function when transfer is occur?</title>
      <dc:creator>Lloyd A. Ramos</dc:creator>
      <pubDate>Thu, 06 Jul 2023 06:59:43 +0000</pubDate>
      <link>https://dev.to/laronlineworld/how-to-call-a-function-when-transfer-is-occur-1641</link>
      <guid>https://dev.to/laronlineworld/how-to-call-a-function-when-transfer-is-occur-1641</guid>
      <description>&lt;p&gt;0&lt;/p&gt;

&lt;p&gt;I have a token contract, every tranfer a function is triggered Assumming the function I want to call is addFund&lt;/p&gt;

&lt;p&gt;So I have this interface&lt;/p&gt;

&lt;p&gt;`interface IContract {&lt;br&gt;
    struct Funds {&lt;br&gt;
        IERC20 token;&lt;br&gt;
        uint256 amount;&lt;br&gt;
    }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function addFunds(Funds[] calldata funds) external;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

&lt;p&gt;The use of addFunds is to receive a fund. The logic of the token is in every transfer an amount will goes to addFunds as the amount and the token is the contract itself.&lt;/p&gt;

&lt;p&gt;The problem is The owner of the addFunds should be the token contract in order to trigger the addFunds. How can I trigger the addFunds by every transfer of token?&lt;/p&gt;

&lt;p&gt;This is the code for addfunds&lt;/p&gt;

&lt;p&gt;`/// @notice transfers {_tokens, amounts} for each token, amount pair provided from the tx sender to the campaign address&lt;br&gt;
  /// while taking commission for postmint.&lt;br&gt;
  /// &lt;a class="mentioned-user" href="https://dev.to/param"&gt;@param&lt;/a&gt; funds defines the tokens and amounts to transfer, they MUST be part of the tokens supported by the campaign.&lt;br&gt;
  /// @dev this function transfers amounts[i] for tokens[i] to the campaign.&lt;br&gt;
  /// The number of tokens MUST match the number of amounts.&lt;br&gt;
  function addFunds(Funds[] calldata funds) public onlyOwner {&lt;br&gt;
    uint256 fundsLen = funds.length;&lt;br&gt;
    if (fundsLen == 0) {&lt;br&gt;
      revert NoFundsProvided();&lt;br&gt;
    }&lt;br&gt;
    for (uint256 i = 0; i &amp;lt; fundsLen; ) {&lt;br&gt;
      bool supported = supportedToken(funds[i].token);&lt;br&gt;
      if (!supported) {&lt;br&gt;
        revert UnsupportedToken(address(funds[i].token));&lt;br&gt;
      }&lt;br&gt;
      if (funds[i].amount == 0) {&lt;br&gt;
        revert NoAmountProvided();&lt;br&gt;
      }&lt;br&gt;
      _handleAddFunds(funds[i].token, funds[i].amount);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  unchecked {
    i++;
  }
}
emit AddedFunds(msg.sender, funds);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}`&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
