<?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>Forem: ShibaWallet - Multichain Meme Crypto Wallet</title>
    <description>The latest articles on Forem by ShibaWallet - Multichain Meme Crypto Wallet (@shibawalletpro).</description>
    <link>https://forem.com/shibawalletpro</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%2F905793%2Fa23a6264-fd3e-47ef-a0d8-033bdf37b8e0.jpg</url>
      <title>Forem: ShibaWallet - Multichain Meme Crypto Wallet</title>
      <link>https://forem.com/shibawalletpro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/shibawalletpro"/>
    <language>en</language>
    <item>
      <title>Cannot transfer ONG via JS-SDK</title>
      <dc:creator>ShibaWallet - Multichain Meme Crypto Wallet</dc:creator>
      <pubDate>Tue, 09 Aug 2022 09:35:00 +0000</pubDate>
      <link>https://forem.com/shibawalletpro/cannot-transfer-ong-via-js-sdk-55i2</link>
      <guid>https://forem.com/shibawalletpro/cannot-transfer-ong-via-js-sdk-55i2</guid>
      <description>&lt;p&gt;Hi Ontology dev team, &lt;/p&gt;

&lt;p&gt;We stuck with an issue of transfer ONG coin from Ontology EVM to Ontology Native via JS-SDK, this is hard for us to integrate Ontology into our popular crypto ShibaWallet.&lt;/p&gt;

&lt;p&gt;Our team is eager to solve the problem so that we hope the dev team is able to answer it here, please.&lt;/p&gt;

&lt;p&gt;We just follow the step on docs.&lt;a href="https://ontio.github.io/documentation/tutorial_for_developer_en.html"&gt;https://ontio.github.io/documentation/tutorial_for_developer_en.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The error is saying: Insufficient balance, but my account actually has 6000 ONG and I can see it on the block exporer explorer.ont.io&lt;/p&gt;

&lt;p&gt;Please! please!&lt;/p&gt;

&lt;p&gt;Environment:&lt;br&gt;
"ontology-ts-sdk": "^2.0.0"&lt;/p&gt;

&lt;p&gt;To get the balance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const rest = new OntWallet.RestClient(CONST.MAIN_ONT_URL.REST_UR);
let balance = await rest.getBalanceV2(addr)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--v2GgtJYL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9932dej62trhbio99s3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--v2GgtJYL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9932dej62trhbio99s3.png" alt="Image description" width="880" height="273"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To make a transaction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OntAssetTxBuilder.makeWithdrawOngTx(from, _to, amount, payer, gasPrice, gasLimit);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OntAssetTxBuilder.makeTransferTx(assetType, from, _to, amount, gasPrice, gasLimit, payer);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Both are failed to send due to insufficient balance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GOv_qCCl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dexioj9sbt7jbnt03hzf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GOv_qCCl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dexioj9sbt7jbnt03hzf.png" alt="Image description" width="880" height="63"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code snippet:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--p5Taqo3D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rb4buukqa8bnj6qomla5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--p5Taqo3D--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rb4buukqa8bnj6qomla5.png" alt="Image description" width="880" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ontology</category>
      <category>ong</category>
      <category>blockchain</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
