From a13bbadd2eeb865b0fe0fcd1969a7bb612055f6d Mon Sep 17 00:00:00 2001 From: hvarona Date: Wed, 28 Nov 2018 23:12:04 -0400 Subject: [PATCH] Change EULA Added memo to bitshares send request --- .../manager/BitsharesAccountManager.java | 15 +++++++-- app/src/main/res/values/integers.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- .../crystalwallet/ExampleUnitTest.java | 33 ++++++++++++++++++- 4 files changed, 46 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java b/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java index d89b942..bcb9b99 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/manager/BitsharesAccountManager.java @@ -8,6 +8,7 @@ import com.google.common.primitives.UnsignedLong; import org.bitcoinj.core.ECKey; +import java.math.BigInteger; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -58,6 +59,7 @@ import cy.agorise.graphenej.UserAccount; import cy.agorise.graphenej.models.AccountProperties; import cy.agorise.graphenej.models.BlockHeader; import cy.agorise.graphenej.models.HistoricalTransfer; +import cy.agorise.graphenej.objects.Memo; import cy.agorise.graphenej.operations.TransferOperationBuilder; /** @@ -585,9 +587,16 @@ public class BitsharesAccountManager implements CryptoAccountManager, CryptoNetI .setTransferAmount(new AssetAmount(UnsignedLong.valueOf(sendRequest.getAmount()), new Asset(idAsset))) .setFee(new AssetAmount(UnsignedLong.valueOf(0), feeAsset)); if (sendRequest.getMemo() != null) { - //builder.setMemo(new Memo(fromUserAccount,toUserAccount,0,sendRequest.getMemo().getBytes())); - //TODO memo - System.out.println("transaction has memo"); + try { + //TODO change authority for memo + Address fromAddress = new Address(fromUserAccount.getActive().getKeyAuthList().get(0).getKey(), "BTS"); + Address toAddress = new Address(toUserAccount.getActive().getKeyAuthList().get(0).getKey(), "BTS"); + builder.setMemo(new Memo(fromAddress,toAddress,BigInteger.ZERO,sendRequest.getMemo().getBytes())); + //TODO add random nonce + }catch ( Exception e){ + e.printStackTrace(); + //TODO error + } } ArrayList operationList = new ArrayList<>(); operationList.add(builder.build()); diff --git a/app/src/main/res/values/integers.xml b/app/src/main/res/values/integers.xml index c0e6681..88f421a 100644 --- a/app/src/main/res/values/integers.xml +++ b/app/src/main/res/values/integers.xml @@ -1,5 +1,5 @@ - 1 + 2 \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 02263a8..b6cd81e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -142,7 +142,7 @@ EDIT PIN Export Show more -

Crystal Terms and Conditions of Use

The following terminology applies to these Terms and Conditions of Use (our “Terms”), the Privacy and Transparency Statement, and any and all other agreements between you and us: “Client”, “Customer”, “User”, “You” and “Your” refers to you, the person accessing the Crystal software application (“App”) and accepting our Terms. “Agorise”, “The Company”, “Our”, “Ourselves”, “We” and “Us” collectively refers to the App and to its owners, freelancers, developers, designers, contractors, directors, officers, employees, agents, insurers, suppliers, and attorneys. “Party” refers to either You or Us. In these Terms, unless otherwise specified, words importing the singular include the plural and vice versa and words importing gender include all genders. “Digital asset”, “asset”, “coin”, “cryptocurrency”, “ledger entry”, “altcoin” and “token” refer to blockchain-based software ledger data entries.

By using the App, you represent and warrant that you are:

  • at least 18 years old and have full capacity to contract under applicable law;
  • only transacting with the App with legally-obtained funds that belong to you;
  • not furthering, performing, undertaking, engaging in, aiding, or abetting any unlawful activity through your relationship with Us or through your use of the App; and,
  • comporting with and obeying all applicable laws.

We reserve the right to terminate your access to the App for any reason, including but not limited to breaches of our Terms, in our sole and absolute discretion. Use of the App is void where prohibited by applicable law.

1. Terms

By accessing the App, you agree to be bound by our Terms, all applicable laws and regulations, and you agree that you are responsible for compliance with, and that you are compliant with applicable law. If you do not agree with any of our Terms, you are prohibited from using or accessing the App; your only recourse is to stop using the App. Any use of the App is your deemed acceptance of our Terms as they may be modified and amended from time to time. The materials contained in the App are protected by applicable copyright and trademark laws and treaties. You should check back often in case our Terms undergo changes.

By accepting our Terms, you expressly allow Us to export data outside of the jurisdiction in which you reside or are located when you access the App.

2. Limitations

Use of the App may carry financial risk, and is to be used as an experimental software utility only. In no event shall We be liable or responsible for any damages, claims, applications, losses, injuries, delays, accidents, costs, business interruption costs, or other expenses (including, without limitation, attorneys’ fees or the costs of any claim or suit), nor for any incidental, direct, general, indirect, special, punitive, exemplary, or consequential damages, loss of goodwill or business profits, loss of cryptocurrency or digital assets, work stoppage, data loss, computer or device failure or malfunction, or any other commercial or other losses directly or indirectly arising out of or related to: our Terms; the Privacy and Transparency Statement; any service We provide; the use of the App; any use of your digital assets or cryptocurrency with the App by any other party not authorized by you (collectively, all of the foregoing items shall be referred to herein as “Losses”). We are hereby released by you from liability for any and all Losses. We disclaim any and all warranties or guarantees, including any warranty of merchantability and warranty of fitness for any particular purpose. The foregoing limitations of liability shall apply whether the alleged liability or Losses are based on contract, negligence, tort, strict liability, or any other basis, even if We have been advised of or should have known of the possibility of such losses and damages, and without regard to the success or effectiveness of other remedies. Notwithstanding anything else in our Terms, in no event shall the combined aggregate liability for any Loss hereunder exceed 50.00€.

3. Prices, Surety, Exchange Rates and Confirmations

Cryptocurrencies and digital assets are highly experimental and risky. Our App attempts to provide accurate price and exchange rate information, but this information is highly volatile and can change quickly without users necessarily being aware of these changes.

The confirmation time of some cryptocurrencies can be very lengthy. For example, if a customer pays with Bitcoin but pays a minimal miner fee when sending their funds to the App, then that customer’s payment may not be processed by that network for hours, if at all. Due to this limitation, the App offers a Surety feature, allowing you to pre-fund a blockchain account (shared with Us). If enough bridge Surety has been pre-funded into that account, then the App will notify the customer immediately that their payment has been accepted. This Surety feature in the App is known as the “Morphit” bridge. The bridge instantly locks away some of your pre-funded Surety until at least one block confirmation has been received on that customer’s transaction. Once one confirmation has been received by the bridge, then the bridge will unlock those funds back into the shared blockchain account. If the customer’s payment is never confirmed in even one block, then that amount of Surety that was locked away will not be released back to you.

 

Bridge Surety is not needed, or used in the App for customers that choose to pay with a cryptocurrency that uses an EOS or Graphene-based blockchain such as Bitshares or Steem, since those blockchains confirm transactions in 3 seconds or less.

The more bridge Surety that you pre-fund in the App, the more slow (lengthy confirmation time) coins that you can accept at once. Typically though, 100€ worth of Surety should be enough since customer’s that use slow coins don’t spend more than that at once. However, if you have 2 or 3 cash registers (or Waitresses, etc), then you may want to double or triple that amount. Of course if you sell expensive items such as cars or houses for Bitcoin, then you should pre-fund much more in Surety and/or ask your customer to pay the maximum miner fee.

The exchange rate that the customer pays (if applicable) is calculated at the moment the App presents the amount due to the customer (via the QR Code or NFC signal). Due to individual blockchain specifications, the customer payment is typically considered “accepted” at one block confirmation. If the bridge had to be used (because your customer paid with a slow coin), the bridge will then release the Surety back to you that was locked away while the bridge was awaiting that one block confirmation. It is important to note that a payment being broadcast to a blockchain network does not constitute an acceptance by Us of that payment.

4. Returns and Refund Policy

Cryptocurrencies, tokens, and digital assets are, by their nature, generally irreversible, and their exchange rates are highly volatile and transitory. Once the User’s asset has been transmitted to the User’s address, no refund is possible, even if the wrong address was provided to the App. All sales after transmission are final.

 

Surety can be 100% refunded at any time from within the App itself. With no pre-funded bridge Surety however, only EOS or Graphene based cryptocurrencies should be accepted.

5. Governing Law

These Terms are governed by the laws of Cyprus, and any and all laws applicable therein.

Our Terms are to be treated in all respects as a Cypriot contract. We and you irrevocably and unconditionally attorn to the non-exclusive jurisdiction, venue and forum of the courts of Nicosia, Cyprus, and all courts competent to hear appeals therefrom.

6. Prohibited Jurisdictions

It is prohibited to use or access cryptocurrencies and/or Digital assets from certain jurisdictions. Transactions from Users in these jurisdictions are prohibited. By accessing the App or any services therein, you represent and warrant that you are not physically located in a prohibited jurisdiction.

7. Permissible Use

The App and all its services may be used only as a mechanism of software ledger entry translation between the User and the BitShares blockchain. You are prohibited from using the App for the purpose of translating ledger entries with other parties, with the exception of explicit payment for goods and services.

8. Terms of Use Modifications

We may revise our Terms at any time and without notice to you or third parties. By using the App, you agree to be bound by the then-current version of our Terms. We reserve the right to make any changes retroactive.

9. Costs

From time to time, We may need to spend time dealing with issues brought to Us by customers. Where any customer issue is not caused by our negligence or oversight, We reserve the right to recover reasonable administrative costs spent addressing the customer issue.

Privacy and Transparency Statement

We respect the privacy of Users of Our App by not requesting any information that is unnecessary for the use of the service or to comport with our obligations under applicable law.

We also do not in any way obscure the information that it does request or obtain. Due to the inherent transparency of blockchains, transactions to and from the App are public and easily correlated. Utilizing the App to obscure transactions or assets in any way is futile. Law enforcement has full access to blockchain information that goes in or out of the BitShares network.

You accept that We will comply willingly with all legal requests for information from it. We reserve the right to provide information to law enforcement personnel and other third parties to answer inquiries; to respond to legal process; to respond to the order of a court of competent jurisdiction and those exercising the court’s authority; and, to protect Ourselves and our users.

Copyright 2018 AGORISE, LTD.

An International Business Co.

Cyprus Reg# HE375959

 

IF YOU AGREE TO THESE TERMS, PLEASE TAP ON THE BLUE BUTTON BELOW.

]]>
+

                          

Crystal Terms and Conditions of Use

 

Crystal is a software Application (also known as an “App”) developed by the International Business Company “AGORISE, LTD.”, which has been established under Cypriot law. Any person wishing to use this App is obliged to accept the following Terms and Conditions of Use, before any such use:

 

Part I - Terminology

 

The following Terminology applies to these Terms and Conditions of Use (hereinafter referred to as “Terms”), the Privacy and Transparency Statement, and all other agreements between You and Us:

  • The terms “Client”, “Customer”, “Merchant”, “User”, “You” and “Your” refer to you, the person accessing the Crystal software Application (hereinafter referred to as “App”) and hereby accepting our Terms.
  • The terms “Agorise”, “The Company”, “Our”, “Ourselves”, “We” and “Us” collectively refer to the App and to its owners, freelancers, developers, designers, contractors, directors, officers, employees, agents, insurers, suppliers, and attorneys.
  • The term “Party” refers to either You or Us.
  • In all the above-mentioned Terms, unless otherwise specified, words using the singular include the plural and vice versa and words using gender include all genders.
  • The terms “digital asset”, “asset”, “coin”, “cryptocurrency”, “ledger entry”, “altcoin” and “token” refer to blockchain-based software ledger data entries.
  • The term “Blockchain” refers to a chain of blocks, processed by hundreds of computers around the world. A blockchain (like “Bitshares”) is a decentralized network of computers, an immutable distributed ledger. As each block of transactions is confirmed every 3 (three) seconds, it is hashed together with the latest block in the chain, forming the next block in the chain. Hence the term blockchain.
  • The term “Ledger” refers to a digital version of the “big book” of blocks of transactions taking place on a blockchain. The Distributed ledger keeps track of all transactions on a blockchain network.
  • The name “Morphit” refers to the name chosen by our Company for the Bridge.
  • The term “Bridge” refers to a company or autonomous software (like the “Morphit” feature of our App) which converts/morphs one cryptocurrency into another by way of seeking the best possible price for the Customer by using various third-party exchanges.
  • The terms “Teller” or “Gateway” refers to a person or company (or autonomous software) that converts “fiat” (USD, EUR, CNY, etc) into cryptocurrencies, and vice-versa, whether by cash, card, Swift or SEPA, etc.
  • The term “Multisig” refers to Multiple Signatories. Multiple people or accounts that are assigned to validate a transaction before it can be allowed to be processed, and entered into a block on the chain. Typically, two or more people sign the transaction with their private key (Public Key Infrastructure (PKI)) which will approve the transaction to be sent.
  • For the term “Bitshares” more information can usually be found at the website: http://www.bitshares.org
  • The term “Coin” refers to a digital token. It is underlined that this term is still loosely defined in legislation. It’s a unit of value (if it has any value at all, as determined by the free market) which is running on a blockchain.
  • The term “BTS” refers to the core token that the Bitshares platform uses to determine fair-market values for tokens.

 

Part II - Terms and Conditions of Use

 

By using the App, you represent and warrant that you are:

  1. at least 18 (eighteen) years old and have full capacity to contract under the applicable law;
  2. only transacting with the App with legally-obtained funds that belong to you;
  3. not furthering, performing, undertaking, engaging in, aiding, or abetting any unlawful activity through your relationship with Us or through your use of the App (for example: money laundering, etc); and,
  4. comporting with and obeying all applicable laws.

 

We reserve the right to terminate your access to the App for any breach or our Terms, in our sole and absolute discretion, if the App ceases to exist and/or following a decision of the Company. Use of the App is void where prohibited by applicable law.

 

1. Terms

 

1.1 By accessing the App, you agree to be bound by our Terms, all applicable laws and regulations in Cyprus, and you agree that you are responsible for compliance with, and that you are compliant with applicable law.

 

1.2 If you do not agree with any of our Terms, you are prohibited from using or accessing the App. Your only recourse is to stop using the App. Any use of the App after accepting these Terms is considered to be a deemed acceptance of our Terms, as they may be modified and amended from time to time.

 

1.3 The materials contained in the App are protected by applicable copyright and trademark laws in Cyprus and EU and international treaties. The updates of our Terms, as they appear on our website, take into account the legislative modifications.

 

1.4 By accepting our Terms, you expressly accept that data of transactions made when accessing the App might be exported outside the jurisdiction in which you reside or are located when you access the App. This export is an inherent part of our App and is necessary for its functioning and does not include personal data of Users in any way.

 

1.5 By using any of the third-parties linked to within the App (such as Tellers or Gateways), it is not an endorsement of those third-parties, nor is it a guarantee of any kind that using those third-parties will not result in loss of funds or other damages. Use those third-parties at your own risk.

 

2. Limitations

 

The use of this App may carry financial risk for any User, and is to be used as an experimental software utility only. In no event shall We be liable or responsible for any damages, claims, applications, losses, injuries, delays, accidents, costs, business interruption costs, or other expenses (including, without limitation, attorneys’ fees or the costs of any claim or suit), nor for any incidental, direct, general, indirect, special, punitive, exemplary, or consequential damages, loss of goodwill or business profits, loss of cryptocurrency or digital assets, work stoppage, computer or device failure or malfunction, or any other commercial or other losses directly or indirectly arising out of or related to:

  1. our Terms;
  2. the Privacy and Transparency Statement;
  3. any service We provide;
  4. the use of the App;
  5. any use of your digital assets or cryptocurrency with the App by any other party not authorized by you (collectively, all of the foregoing items shall be referred to herein as “Losses”).

 

We are hereby released by You from liability for any kind of the above-mentioned Losses. We disclaim any and all warranties or guarantees, including any warranty of merchantability and warranty of fitness for any particular purpose.

 

The foregoing limitations of liability shall apply whether the alleged liability or Losses are based on contract, negligence, tort, strict liability, or any other basis, even if We have been advised of or should have known of the possibility of such losses and damages, and without regard to the success or effectiveness of other remedies. Notwithstanding anything else in our Terms, in no event shall the combined aggregate liability for any Loss hereunder exceed € 50.00 (fifty euros).

 

3. Prices, Exchange Rates, Surety and Confirmations

 

3.1 Users are hereby informed that Cryptocurrencies and digital assets in general are highly experimental and risky. Our App attempts to provide accurate price and exchange rate information, but this information is as well highly volatile and can change quickly without Users or Us necessarily being aware of these changes.

 

3.2 The exchange rate that the Customer pays (if applicable) is calculated at the moment the App presents the amount due to the customer (via the QR Code or NFC signal). Our App will always seek out the best price for the Customer.

3.3 The confirmation time of some cryptocurrencies can be very lengthy. For example, if a customer pays with a slow coin such as the Petro (Venezuela) but pays a minimal miner fee when sending their funds to the App, then that customer’s payment may not be processed by that network for many hours, if at all.

 

Due to this risk, the App offers a Surety feature, allowing You to voluntarily pre-fund a Multisig blockchain account (for example: joes-grocery-morphit) with some Bitshares (BTS) tokens, and then voluntarily share that account with the Morphit bridge algorithm in the App temporarily.

 

This way, the bridge can send the necessary BTS or smartcoins to the Merchant instantly, be protected from customer minimal miner fee or double-spend scams, and confirm the customers "completed" payment so that the customer doesn't have to stand there waiting for their (slow coin) payment to confirm. The customer can then theoretically pay with any supported coin and leave in as little as 3 seconds. Payments in a Bitshares token do not require use of a bridge or surety at all since that chain is so fast. Steem payments don't need surety either, but the bridge is used real quick to convert it to the merchants desired BTS or smartcoin. The merchant can empty their surety account any time they like, or add more funds to it for high volume (such as grocery chains) or larger transactions (such as homes or cars).

 

If however, the customer’s payment is never confirmed by their network, then that amount of Surety that was shared with the bridge will not be released back to You. The bridge will not assume any risk of Your customers payments not clearing.

 

Due to individual blockchain specifications, the Customer payment is typically considered “accepted” by the bridge at two block confirmations. If a bridge had to be used, the bridge will then automatically release the Surety back to you that was shared while the bridge was awaiting those two block confirmations. It is important to note that a payment being broadcast to a blockchain network does not constitute an acceptance by the App of that payment.

 

4. Returns and Refund Policy

 

4.1 Cryptocurrencies, tokens, and digital assets are, by their nature, generally irreversible, and their exchange rates are highly volatile and transitory. Once the User’s asset has been transmitted to the User’s address, no refund is possible, even if the wrong address was provided to the App. All sales after transmission are final and the Company is not in position to reverse or correct the process already undertaken by the App.

 

4.2 Surety can be 100% refunded at any time from within the App itself. With no pre-funded bridge Surety however, only EOS or Graphene-based cryptocurrencies should be accepted (such as Steem and/or Bitshares tokens).

 

5. Governing Law

 

5.1 These Terms are governed by the laws of Cyprus, and any and all laws applicable therein.

 

5.2 Our Terms are to be treated in all respects as a Cypriot contract. We and You irrevocably and unconditionally attorn to the non-exclusive jurisdiction, venue and forum of the courts of Nicosia, Cyprus, and all courts competent to hear appeals therefrom.

 

6. Permissible Use 

 

The App and all its services may be used only as a mechanism of software ledger entry translation between the User and the Bitshares blockchain. You are prohibited from using the App for the purpose of translating ledger entries with other parties, with the exception of explicit payment for goods and services.

 

7. Terms of Use Modifications 

 

7.1 We may revise our Terms at any time and without notice to you or third parties. By using the App, you agree to be bound by the then-current version of our Terms. All modifications generally apply ex nunc, unless otherwise specified in special cases, if this is justified by the circumstances.

 

7.2 The Terms as they appear on the website of our App are always up-to-date. Therefore, Users are advised to visit the relevant part of the website regularly in order to be informed of the latest changes.

 

8. Costs 

 

8.1 From time to time, We may need to spend time dealing with issues brought to Us by customers, for example requests of information.

 

8.2 Where any customer issue is not caused by our negligence or oversight, We reserve the right to recover reasonable administrative costs spent addressing the customer issue. These costs will be calculated by the Company taking into account the relevant administrative burden caused to it and will be communicated to the Customer.

 

8.3 No response will be sent to the Customer if this entails a payment from his side, before the cost is communicated to him by the email provided by him for this specific purpose.

 

9. Transparency Statement 

 

9.1 No personal data whatsoever of Users is registered, stored or processed in any way; Users are solely liable for keeping the “key” which is necessary to access the interface and in case of loss renders this access impossible. Therefore, the Regulation (EU) No 2016/679 (GDPR) is not applicable within the framework of this App.

 

9.2 We also do not in any way obscure the information that it does request or obtain. Due to the inherent transparency of blockchains, transactions to and from the App are public and easily correlated. Utilizing the App to obscure transactions or assets in any way is futile. Law enforcement has full access to blockchain information that goes in or out of the Bitshares network.

 

9.3 You accept that We will comply willingly with all legal requests for information from it. We reserve the right to provide information to law enforcement personnel and other third parties to answer inquiries; to respond to legal process; to respond to the order of a court of competent jurisdiction and those exercising the court’s authority; and, to protect Ourselves and our users.

 

Copyright 2018 AGORISE, LTD.

An International Business Co.

Cyprus Reg# HE375959

 

IF YOU AGREE TO ALL OF THESE TERMS AND CONDITIONS, PLEASE TAP ON THE GREEN BUTTON BELOW

]]>

I just found this awesome Smartcoins Wallet that allows you to send and receive Smartcoins.

http://BitShares-Munich.de

Check it out !

diff --git a/app/src/test/java/cy/agorise/crystalwallet/ExampleUnitTest.java b/app/src/test/java/cy/agorise/crystalwallet/ExampleUnitTest.java index 79db5b8..14c1838 100644 --- a/app/src/test/java/cy/agorise/crystalwallet/ExampleUnitTest.java +++ b/app/src/test/java/cy/agorise/crystalwallet/ExampleUnitTest.java @@ -1,8 +1,19 @@ package cy.agorise.crystalwallet; +import org.bitcoinj.core.Base58; import org.junit.Test; -import static org.junit.Assert.*; +import java.math.RoundingMode; +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Arrays; +import java.util.Locale; + +import cy.agorise.graphenej.Invoice; +import cy.agorise.graphenej.LineItem; +import cy.agorise.graphenej.Util; + +import static junit.framework.Assert.assertEquals; /** * Example local unit test, which will execute on the development machine (host). @@ -10,8 +21,28 @@ import static org.junit.Assert.*; * @see Testing documentation */ public class ExampleUnitTest { + + //static String qrCode = "CQEZu91fWYH9dr2kRx2SxfBABxaKXWF7wwAn5Y4oeoe5aXoouAahm1P7a42eog7HtihvPhwHqFzeMBScuxgEonfq1euo9sZwUte9Zy5tbVK9tr3WR8kFXShCCantyM2iXGuucSXLsvpCdgNBUL5tEdZm27Lws71mhTHwy13WutDJBHDGpTn68His6f69F4kTQcZG9Ri9L1PXm"; + static String qrCode = "Y1cyE5NiEfp6icMmzP1VFiQEYuXgX3xHjTBkVBZquZZxxbZWPrefG4D8f1zPEEhmuvcJpcgWEn5Fj2YsKzvzUViRQy3r1SY3usSK6Y1vuWpAcZDZkJxDUKnhPchTj7yT3jXQmnz2EU1fvzgpN12nF2bkRvnYmo9wtCVEECgaXwvVyzz92ZAo5ju71dh"; + @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); + Invoice invoice = Invoice.fromQrCode(qrCode); + System.out.println("To : " + invoice.getTo()); + System.out.println("Currency : " +invoice.getCurrency()); + System.out.println("Memo : " +invoice.getMemo()); + + + double amount = 0.0; + for (LineItem nextItem : invoice.getLineItems()) { + amount += nextItem.getQuantity() * nextItem.getPrice(); + } + DecimalFormat df = new DecimalFormat("####.####"); + df.setRoundingMode(RoundingMode.CEILING); + df.setDecimalFormatSymbols(new DecimalFormatSymbols(Locale.ENGLISH)); + System.out.println("Amount : " +amount); + + System.out.println(new String(Util.decompress(Base58.decode(qrCode),Util.LZMA))); } } \ No newline at end of file