Skip to content

Commit

Permalink
Merge pull request #3132 from superhero-com/feature/fix-sending-fungi…
Browse files Browse the repository at this point in the history
…ble-tokens

fix(fungible-token): be able to send big amount
  • Loading branch information
CedrikNikita authored Jun 26, 2024
2 parents 2ba0b0a + 55b8053 commit 610380e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/popup/components/TransferQRCodeGenerator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</template>

<script lang="ts">
import BigNumber from 'bignumber.js';
import {
defineComponent,
onMounted,
Expand Down Expand Up @@ -95,7 +96,7 @@ export default defineComponent({
tag: Tag.SpendTx,
senderId: activeAccount.value.address as Encoded.AccountAddress,
recipientId: recipient,
amount: amount.toString(),
amount: new BigNumber(amount).toFixed().toString(),
payload: encode(new TextEncoder().encode(props.transferData.payload), Encoding.Bytearray),
});
Expand Down
4 changes: 2 additions & 2 deletions src/protocols/aeternity/components/TransferReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ export default defineComponent({
if (props.transferData.invoiceId !== null) {
actionResult = await burnTriggerPoS(
selectedAsset.contractId as Encoded.ContractAddress,
amount.toString(),
new BigNumber(amount).toFixed().toString(),
props.transferData.invoiceContract,
props.transferData.invoiceId,
{ waitMined: false },
);
} else if (!isSelectedAssetAeCoin) {
const aeternityAdapter = ProtocolAdapterFactory.getAdapter(PROTOCOLS.aeternity);
actionResult = await aeternityAdapter.transferToken?.(
amount.toString(),
new BigNumber(amount).toFixed().toString(),
recipient,
selectedAsset.contractId as Encoded.ContractAddress,
{ waitMined: false },
Expand Down

0 comments on commit 610380e

Please sign in to comment.