diff --git a/app/src/main/assets/tos.html b/app/src/main/assets/tos.html deleted file mode 100644 index 728ab43409..0000000000 --- a/app/src/main/assets/tos.html +++ /dev/null @@ -1,1366 +0,0 @@ - - - - - file_1666291144852 - - - -

SaltPay Oly Card Terms of Service

-


-

We are delighted that you (“you”, - “your”, or the “Cardholder”) have chosen to use the SaltPay Oly Card (the “Card”). The terms - and conditions set out here (“Terms”) govern your use of your Card as operated by SaltPay.

-

When you use the Card, you also agree to - the SaltPay General Terms - which are incorporated into these Terms by - reference, including any amendments made to those from time to time. If you do not understand any provisions of - these Terms, please contact us before using the Card. For information about how we treat your personal data, - please see our Privacy Policy.

-


-
    -
  1. - Definitions

    -

    - Affiliate: means any entity controlling, controlled by or under common control with that party, where “control” means the ownership of more than 50% of (i) the voting securities or (ii) an interest in the assets, profits, or earnings of an entity. -

    -

    - Blockchain Asset: means a digital data stored in and protected by the blockchain network, including but not limited to ownership right and value of cryptocurrency, tokenized assets, non-fungible asset. -

    -

    Cardholder: a person who holds a SaltPay Oly Card. -

    -

    Private Key: a secret cryptographic key which provides full control over a Blockchain Asset. -

    -

    Public - Key: means a cryptographic key, which provides access to information about a Blockchain Asset, including but not limited to Blockchain Address. -

    -

    SaltPay: Salt Pay IIB hf. -

    -

    SaltPay Oly Card / Card: physical card which stores Private Key and Public Key.

    -

    Services: enabling the use of the SaltPay Oly Card at physical point of sale terminals that are enabled for the acceptance of Visa Debit cards. -

    -

    - Tangem: means Tangem AG, a company incorporated in Switzerland with company number 1315048, whose address is at Baarerstrasse 10, 6300 Zug. -

    -

    Tangem - Mobile Application: Third party mobile application, providing interoperability between SaltPay Oly Card and blockchain, and working on NFC-capable smartphones and tablets using Google Android and Apple iOS operating systems. -

    -

    Tangem - Service: means the service provided by Tangem, which provides and administers the Tangem Mobile Application, which enables Cardholders to generate and store Public Keys and Private Keys in a hardware crypto wallet. -

    -

    Transaction: means any payment made by a Cardholder at any physical POS terminal using the Card. -

    -

    Utorg Service: means providing services of exchanging a virtual currency against a fiat currency. -

    -


  2. -
  3. Important Legal - Stuff

    -

    We think - it’s important that we highlight and clearly explain how SaltPay safeguards its interests, while offering - its services to its Cardholders (you!) which includes limitation of liability and disclaimers. The sections - set out below reflect those safeguards and how they might impact you. It’s therefore important that you read - them carefully. If you’re unsure about any of them, please get in touch.

    -
      -
    1. - These Terms of Service (the “Terms”) govern the use of SaltPay Oly Cards to authorised employees - of SaltPay and its Affiliates.

    2. -
    3. - The Cards may be used for storage of Private Key and Public Key to the Cardholder’s Blockchain Assets - and authentication of Card Transactions with the purpose of transfer of Blockchain Assets for goods and - services purchasing through the Visa payments infrastructure.

      -


    4. -
    5. The Cardholder - agrees that these Terms are binding.

    6. -
    7. The Cardholder shall be - the only person having physical access to the Card.

    8. -
    9. - The Cardholder acknowledges and agrees that SaltPay does not provide backup or recovery of Private Key - and Public Key stored by the Card. The Cardholder creates the backup of the SaltPay Card at the point at - which they activate the Card through the Tangem Mobile Application by linking their Card with Tangem - Wallet.

      -


    10. -
    11. The conditions of - use of the Tangem Wallet and Mobile Application are defined in the terms of service for the Tangem - Wallet and Mobile Application, which will also be available upon downloading the application.

      -


    12. -
    -
  4. -
  5. SaltPay’s - obligations

    -
      -
    1. SaltPay agrees to - provide the Cardholder with the Service in accordance with these Terms and within the agreed scope.

      -
    2. -
    3. Under the condition - that the Cardholder exercises their obligations set out under Clause 4 of these Terms, SaltPay shall use - its best endeavours to ensure that the Card will function properly and without restriction until the - date on which the Card expires.

    4. -
    5. SaltPay shall ensure - that the Card prevents duplication of the Private Key, and that the Cardholder has exclusive control - over the Blockchain Asset unless the contrary is imposed by specific blockchain network rules e.g., two - or more private keys can be used to control the same Blockchain Asset.

      -


    6. -
    7. SaltPay - agrees that it will not keep any records of Cardholder information, save for the Cardholder’s full name, - including but not limited to the amount of Blockchain Asset stored on the Card, the Private Key or - personalised history of Card usage.

      -


    8. -
    9. For the - avoidance of doubt, SaltPay does not guarantee that the operation of Card and/or Tangem Mobile - Application will be secure, accurate, complete, uninterrupted, without error or free of viruses, worms, - other harmful components or other program limitations. SaltPay may, at its sole discretion and without - obligation to do so, correct, modify, amend, enhance, improve and make any other changes to Card.

      -


    10. -
    -
  6. -
  7. The Cardholder’s - obligations

    -
      -
    1. By - accepting these Terms, you represent and warrant that (a) you have the authority to execute and perform - the obligations contained here; (b) you (and your employees, directors, contractors and agents) will - comply with all law applicable to your business and the use of the Card; and (c) you will not use the - Card, directly or indirectly, for any fraudulent or illegal undertaking.

    2. -
    3. - Upon receiving the Card, the Cardholder, if they choose to use the Tangem Service, should download the - Tangem Mobile Application in order to determine the amount of Blockchain Asset stored on the Card.

      -


    4. -
    5. When the Cardholder - pays for goods or services using their SaltPay Oly Card through contactless confirmation using NFC, they - confirm that there is a sufficient balance in the Tangem Wallet and thereby agree that amount is - deducted from the account.

    6. -
    7. - The Cardholder shall at all times keep the Card and the means of access (backup card and pin codes) to - the Card separate from each other.

    8. -
    9. - The Cardholder shall at all times be aware of where the Card is and regularly ensure that it is still in - their possession. The Cardholder shall avoid even temporary possession of the Card by any other person. - If the Card is lost, stolen or destroyed, control over the corresponding Blockchain Asset may be - permanently lost.

    10. -
    11. - The Cardholder shall treat the Card with care and protect the Card from mechanical damage, high - temperatures, strong electromagnetic fields, and other harmful factors.

    12. -
    13. - In the event that the Card is stolen or - lost, and/or if a Cardholder becomes aware of an unauthorised or incorrectly initiated transaction, - the Cardholder shall contact Tangem as soon as possible by sending an email to support@tangem.com - or by using the chat function on the Official Mobile Application.

      -


    14. -
    15. - In the event that the Cardholder wishes - to deactivate their account, they shall contact Tangem by sending an email to support@tangem.com - or by using the chat function on the Official Mobile Application.

      -
    16. -
    17. - The Card can be used only with the official Tangem Mobile Application downloaded from Google Play and - App Store.

    18. -
    19. - The Tangem Mobile Application shall be the exclusive source of information concerning the Blockchain - Address of the Blockchain Asset and corresponding Public Key stored on the Card.

    20. -
    21. - The Cardholder shall only use Near-Field Devices (“NFC Devices”) that are capable of running the - Tangem Mobile Application.

    22. -
    23. - The Card shall be used only for physically tapping and holding near the Cardholder’s NFC Device when the - Tangem Mobile Application requests it. For the avoidance of doubt, the Card cannot be used to pay using - any method which involves gateways.

      -


    24. -
    -
  8. -
  9. The - Cardholder’s liabilities

    -
      -
    1. - The Cardholder is liable for all liabilities arising from the use and misuse of the Card. In any case, - the Cardholder is liable for all transactions authorised using a means of access.

    2. -
    3. - Any loss or damage resulting from the forwarding of the Card and/or means of access shall be borne by - the Cardholder.

    4. -
    5. - Loss or damage incurred by the Cardholder in connection with the possession or use of the Card shall be - borne solely by the Cardholder. SaltPay assumes no liability if the Card cannot be used due to a - technical defect or because it has been cancelled or blocked.

      -


    6. -
    7. Cardholder is only - permitted to use the Products for his personal, non-commercial use. Cardholder is not permitted to - resell the Card.

      -


    8. -
    -
  10. -
  11. SaltPay’s right to - suspend and/or reject payments initiated by the Cardholder

    -
      -
    1. - SaltPay may rightfully suspend any payments initiated by you using the Card in any of the following - circumstances:

      -
        -
      1. - in case of any Transactions which SaltPay suspects may not be valid Transactions, we may suspend - payment until we are satisfied that the Transactions are valid and legitimate;

      2. -
      3. - where SaltPay has requested information from the Cardholder, we may suspend all payments - initiated using the Card until such information has been provided to SaltPay’s satisfaction;

        -
      4. -
      5. - in case of the Cardholder’s violation of these Terms or the terms of service entered into - between the Cardholder and Tangem or Utorg, SaltPay may suspend all payments initiated using the - Card until the violation has been remedied by the Cardholder; and

      6. -
      7. - in case of a suspicion of Cardholder fraud, any illegal activity or a potential violation of the - Terms or the terms of service entered into between you and Tangem or Utorg, SaltPay may suspend - all payments initiated using the Card until an investigation has been concluded by us and we are - satisfied that there has been no Cardholder fraud or violation of the Terms.

      8. -
      -
    2. -
    3. To - the extent permitted by law, we shall notify you of any suspended payment and the reason for suspending - such payment. We reserve the right to change or assert additional reasons for withholding payment should - new information come to SaltPay’s attention that would independently give us a right to suspend in - accordance with clause 6.1.

    4. -
    5. - Once the circumstances entitling us to suspend payment have ended, we will enable the Transaction to be - forwarded on to Tangem, provided that there are no circumstances then in existence which entitle us to - withhold payment.

    6. -
    7. In - the event that a Transaction is found to be invalid or illegitimate, we may rightfully reject the - payment initiated by you and the you will not be able to proceed to access the Tangem Service or Utorg - Service for that Transaction.

    8. -
    9. - For the avoidance of doubt, where evidence of any fraud or illegal activity is found, we may rightfully - terminate the Card and you will no longer have access to the Service, Tangem Service or Utorg - Service.

      -


    10. -
    -
  12. -
  13. - Limitation of liability

    -
      -
    1. - The Card is provided as-is, and except as expressly stated in these Terms, SaltPay provides no express - or implied warranties or conditions, and SaltPay disclaims and excludes any implied terms, - representations, warranties, and conditions with respect to the Card, including warranties of - merchantability, fitness for a particular purpose, title, satisfactory quality and non-infringement, as - well as any other implied warranties, such as warranties regarding data loss, availability, accuracy, - functionality and lack of viruses. These disclaimers will apply except to the extent applicable law does - not permit them. Any warranties, guarantees, or conditions that cannot be disclaimed as a matter of law, - but which may be limited in duration, last for one year from the date on which you receive the Card.

      -
    2. -
    3. - SaltPay shall not be liable and does not warrant or make any representations regarding the services - provided by third parties in relation to the Tangem Service, including but not limited to the Tangem - Mobile Application and the Utorg Service. The relationship between the Cardholder and any third party in - relation to the Tangem Service shall be governed by separate agreements provided below.

    4. -
    5. In - no event shall SaltPay and/or any of its Affiliates be liable for any damages whatsoever, including - direct, indirect, extraordinary, incidental or consequential damages of any kind resulting from or - arising out of the use of Card and/or the Tangem Mobile Application or inability to use Card and/or the - Tangem Mobile Application, failure of Card and/or the Tangem Mobile Application to perform as - represented or expected, loss of goodwill or profits.

    6. -
    7. - SaltPay shall not be held liable for any failure to be able to use the Card and/or the Tangem Mobile - Application for any reason whatsoever, nor will SaltPay be held liable for the loss of the Blockchain - Asset resulting from a malfunction or inoperability of the blockchain network hosting Blockchain Asset, - as well as the inaccessibility of its public servers and services.

    8. -
    9. - SaltPay shall not be held liable for the loss of profits, income, value or any indirect, extraordinary, - consequential, exemplary or punitive damages.

    10. -
    11. SaltPay shall not be - held liable for loss or breakdown of the Card and/or the Tangem Mobile Application.

    12. -
    13. - SaltPay shall not be held liable for any loss of Blockchain Asset in the event of loss or total - breakdown of the Card and/or the Tangem Mobile Application.

    14. -
    15. - The Cardholder hereby acknowledges and agrees that these limitations of liability are agreed allocations - of risk constituting in part the consideration for using the Card and/or the Tangem Mobile Application - and such limitations will apply notwithstanding the failure of essential purpose of any limited

      -

      - remedy, and even if SaltPay and/or any SaltPay Affiliates have been advised of the possibility of - such liabilities and/or damages.

      -


    16. -
    -
  14. -
  15. Term and - Termination

    -
      -
    1. - These Terms become effective upon the date (i) you accept these Terms online (or in another manner - expressly approved by us) or (ii) you first access or use Tangem and shall terminate on the date on - which the Card expires.

      -


    2. -
    3. We may terminate - our arrangement with you under these Terms for any reason or no reason, at any time, by giving 2 months’ - prior notice to this effect. We also reserve the right, pursuant to clause 6, to suspend or terminate - the use of the Card effective immediately.

      -


    4. -
    5. Where your - arrangement with us under these Terms terminates for any reason, you will, where applicable, remain - liable for any fees, charges and other payment obligations you owe us.

      -


    6. -
    -
  16. -
  17. General

    -
      -
    1. - Except as expressly provided herein, these Terms are a complete statement of the agreement between you - and us regarding your use of Tangem. In the event of a conflict between these Terms and the SaltPay - General Terms or any other SaltPay agreement or policy, these Terms shall prevail.

      -


    2. -
    3. These Terms do not - limit any rights that SaltPay may have under trade secret, copyright, patent, or other laws. No waiver - of any term of these Terms shall be deemed a further or continuing waiver of such term or any other - term.

    4. -
    5. In - the event any court shall declare any section or sections of this Agreement invalid or void, such - declaration shall not invalidate the entire Agreement and all other paragraphs of the Agreement shall - remain in full force and effect.

    6. -
    7. For the avoidance of doubt, - provisions around general terms not covered in these Terms of Service, including but not limited to - restrictions and unauthorised or illegal use, intellectual property, data, taxes, indemnification, - warranties, severability, force majeure, and disputes, shall be governed by the SaltPay General - Terms.

    8. -
    -
  18. -
-

TANGEM - WALLET AND TANGEM MOBILE APPLICATION

-

Terms of Service

-


-

PLEASE READ THESE TERMS OF SERVICE - CAREFULLY. BY CLICKING TO ACCEPT, OR BY ACCESSING OR USING OUR SERVICES, YOU AGREE THAT YOU HAVE READ, UNDERSTOOD, - AND ACCEPT ALL OF THE TERMS AND CONDITIONS CONTAINED HEREIN. BY PURCHASE OF THE SALTPAY OLY CARD WITH THE TANGEM - WALLET OR BY USING THE SALTPAY OLY CARD OR BY USING TANGEM WALLET OR BY USING TANGEM MOBILE APPLICATION, YOU - DEMONSTRATE YOUR AGREEMENT TO THESE TERMS AND CONDITIONS CONTAINED HEREIN.

-


-
    -
  1. DEFINITIONS

    -


    -


    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    - “Cardholder

    - means a person who owns Tangem Wallet and SaltPay Oly Card.

    - “Blockchain Asset

    - means a digital data stored in and protected by the blockchain network, including but not limited to - ownership right and value of cryptocurrency, tokenized assets, non-fungible asset.

    - “Blockchain Address

    - means a unique identifier that serves as a virtual location of the Blockchain Asset in the - blockchain.

    - “Card Transaction

    - means transfer of Blockchain Asset from the Blockchain Address associated with the Public Key stored - on the SaltPay Oly Card for goods and services purchased through traditional payments rail.

    - “Official Mobile Application

    - means an application developed and distributed by Tangem, providing interoperability between SaltPay - Oly Card or Tangem Wallet and blockchain, and working on NFC-capable smartphones and tablets using - Google Android and Apple iOS operation systems.

    - “Private Key

    - a secret cryptographic key which provides full control over a Blockchain Asset.

    - “Tangem

    - means Tangem AG, Baarerstrasse 10, 6300 Zug.

    - “Public Key

    - means a cryptographic key, which provides access to information about a Blockchain Asset, including - but not limited to Blockchain Address

    - “Services

    - means the purchase and/or use of the Tangem Wallet and the services or any other features, - technologies or functionalities linked to the Card provided or operated by Tangem AG via the website - or Official Mobile Applications.

    - “Tangem Wallet/Tangem Card / Card

    - means physical card which stores Private Key and Public Key and is used as a backup card for SaltPay - Oly Card.

    -


  2. -
  3. GENERAL - PROVISIONS

    -


    -
      -
    1. - These Terms of Service (the “Terms”) govern the use of Tangem Wallet and/or Official Mobile - Application provided by Tangem AG (referred to as "Tangem", "we" or - "us" in this document) and the related services or any other features, technologies or - functionalities linked to the Tangem Wallet. Tangem is a company

      -

      - incorporated under the laws of Switzerland, with a registered address at Baarerstrasse 10, 6300 Zug, - Switzerland.

      -


    2. -
    3. Tangem Wallet - represents a backup to the SaltPay Oly Card, which may be used only for storage of Private Key and - Public Key to Cardholder’s Blockchain Assets. Tangem Wallet, unlike SaltPay Oly Card, can’t be used for - goods and services purchasing through traditional payments rail. The use of SaltPay Oly Card is governed - by a separate Terms of Service, provided above.

      -


    4. -
    5. Official Mobile - Application is intended for usage only with SaltPay Oly and Tangem Wallet, providing interoperability - between the cards and blockchain via NFC interface. Official Mobile Application DOES NOT:

      -
        -
      1. - Generate, store, transmit, or have access to private (secret) cryptographic keys to blockchain - wallets holding Blockchain assets.

      2. -
      3. Generate, - store, transmit, or have access to secret keys, passwords, passphrases, recovery phrases that - can be used to restore or to copy private (secret) keys to blockchain wallets holding Blockchain - assets.

      4. -
      5. Provide - exchange, trading, investment services on behalf of Tangem.

        -


      6. -
      -
    6. -
    -
  4. -
  5. RIGHTS AND - OBLIGATIONS

    -


    -
      -
    1. Cardholder agrees that - these Terms are binding.

      -


    2. -
    3. Cardholder shall be the - only person having physical access to the Tangem Wallet.

      -


    4. -
    5. - Cardholder acknowledges and agrees that Tangem does not provide backup or recovery of Private Key and - Public Key stored by the Tangem Wallet.

      -


    6. -
    7. Tangem does not - keep records of Cardholder’s personal data, the amount of Blockchain Asset stored on the Card, the - Private Key, or personalized history of Card usage.

      -


    8. -
    -
  6. -
  7. COSTS

    -


    -
      -
    1. - Costs, fees and commission (the “Costs”) may be charged in connection with the use of SaltPay Oly Card. - These Costs are disclosed in the Official Mobile Application to the Cardholder.

      -


    2. -
    3. Amendments to Costs - due to changing expenses or market conditions may be made at any time via adjustments to the fee - schedules. Such amendments shall be communicated to the Cardholder in an appropriate manner. Upon - notification and in the event of the objection, the Cardholder may cancel the SaltPay Oly Card with - immediate effect.

    4. -
    -
  8. -
  9. - CARDHOLDER’S DUTIES OF CARE

    -


    -

    In particular, the Cardholder shall exercise the - following duties of care:

    -


    -
      -
    1. - Upon receiving the SaltPay Oly Card and the Tangem Wallet, the Cardholder should download the Official - Mobile Application from Google Play or Apple app store and create the backup of the SaltPay Oly Card by - linking SaltPay Oly card with Tangem backup wallet following the instructions in the Official Mobile - Application.

      -


    2. -
    3. Cardholder - shall keep the SaltPay Oly Card and Tangem Wallet with care and separate from each other.

      -


    4. -
    5. - Cardholder must always know where the Tangem Wallet is and regularly ensure that it is still in his/her - possession. He/she shall avoid even temporary possession of the Tangem Wallet by any other person.

      -


    6. -
    7. Cardholder shall - treat the Tangem Wallet in the same manner as physical money (cash) and keep it safe. If the SaltPay Oly - Card and Tangem Wallet are lost, stolen or destroyed at the same time, control over the corresponding - Blockchain Asset may be permanently lost.

      -


    8. -
    9. Official Mobile - Application shall be the only source of information about the Blockchain Address of the Blockchain Asset - and corresponding Public Key stored on the SaltPay Oly Card/Tangem Wallet.

      -


    10. -
    11. Cardholder shall - only use Near-Field Devices (the “NFC”) devices that are capable of running Official Mobile - Applications. He/she shall avoid leaving the Tangem Wallet in the proximity of the NFC devices of other - persons.

      -


    12. -
    13. Tangem Wallet shall - be used only for physically tapping and holding near Cardholder’s NFC device when Official Mobile - Application requests it.

      -


    14. -
    15. Cardholder shall - keep the Tangem Wallet with care and protect the Tangem Wallet from mechanical damage, high - temperatures, strong electromagnetic fields, and other harmful factors.

      -


    16. -
    -
  10. -
  11. RIGHTS AND - RESPONSIBILITIES OF CARDHOLDER

    -


    -
      -
    1. - The Cardholder is liable for all liabilities arising from the use of the Tangem Wallet and/or Tangem - Official Mobile Application. As a matter of principle, the Cardholder is liable for any risks resulting - from the misuse of the Tangem Wallet and/or Official Mobile Application. In any case, the Cardholder is - liable for all transactions authorized using a means of access.

      -


    2. -
    3. Any loss or damage - resulting from the forwarding of the Tangem Wallet and/or means of access shall be borne by the - Cardholder.

      -


    4. -
    5. Loss or damage - incurred by the Cardholder in connection with the possession or use of the Tangem Wallet and/or Official - Mobile Application shall be borne solely by the Cardholder. Tangem assumes no liability if the Tangem - Wallet and/or Official Mobile Application cannot be used due to a technical defect or because it has - been canceled, blocked or the spending limit has been adjusted.

      -


    6. -
    7. Cardholder is only - permitted to use the Tangem Wallet and Official Mobile Application for his personal, non-commercial use. - Cardholder is not allowed to resell the Tangem Wallet.

    8. -
    9. - Cardholder is solely responsible to determinate what, if any, taxes apply to Card Transactions. Tangem - or contributors to the Official Mobile Application are NOT responsible for determining the taxes that - apply to Card Transactions.

      -


    10. -
    11. Before Cardholder engages in transactions - using an electronic system, Cardholder should carefully review the rules and regulations of the - third-party provider Utorg OÜ (https://utorg.pro/terms/), - who provides exchange services for SaltPay Oly Card. Online trading has inherent risk due to system - response and access times that may vary due to market conditions, system performance, and other factors. - Cardholder should understand, fully accept and take on these and additional risks before executing any - Card Transactions.

      -


    12. -
    13. There is - considerable exposure to risk in the Blockchain Asset exchange transaction. Any transaction involving - the Blockchain Asset involves risks including, but not limited to, the potential for changing economic - conditions that may substantially affect the price or liquidity of the Blockchain Asset. Investments in - the Blockchain Asset exchange speculation may also be susceptible to sharp rises and falls as the - relevant market values fluctuate. It is for this reason that when speculating in such markets it is - advisable to use only risk capital.

      -


    14. -
    -
  12. -
  13. RESPONSIBILITIES AND - LIABILITIES OF TANGEM

    -


    -
      -
    1. - Tangem does not warrant or make any representations regarding the use, the inability to use or operate, - or the results of the use or operation of the Tangem Wallet and/or Tangem Official Mobile - Application.

      -


    2. -
    3. Tangem does not - provide any backup or recovery of Private Key and Public Key stored on the Tangem Wallet.

      -


    4. -
    5. - Tangem does not keep any records of Cardholder information, the amount of Blockchain Asset stored on the - Tangem Wallet or SaltPay Oly Card, the Private Key, or personalized history of cards usage.

      -


    6. -
    7. Tangem shall not be - held liable for any failure to be able to use the Tangem Wallet and/or Official Mobile Application, for - any reason whatsoever, nor will Tangem be held liable for the loss of the Blockchain Asset resulting - from a malfunction or inoperability of the blockchain network hosting Blockchain Asset, as well as the - inaccessibility of its public servers and services.

      -


    8. -
    9. The Tangem does not - guarantee that the operation of Tangem Wallet and/or Official Mobile Application will be secure, - accurate, complete, uninterrupted, without error or free of viruses, worms, other harmful components or - other program limitations. Tangem may, at its sole discretion and without obligation to do so, correct, - modify, amend, enhance, improve and make any other changes to Tangem Wallet and/or Official Mobile - Application.

      -


    10. -
    11. Tangem shall not be - held liable for the loss of profits, income, value or any indirect, extraordinary, consequential, - exemplary or punitive damages.

      -


    12. -
    13. Tangem shall - not be held liable for loss or breakdown of the Tangem Wallet.

      -


    14. -
    15. - Tangem shall not be held liable for any loss of Blockchain Asset in the event of loss or total breakdown - of the Tangem Wallet or SaltPay Oly Card.

    16. -
    -
  14. -
  15. - GUARANTEES

    -


    -
      -
    1. - Under the condition that the Cardholder exercises the duties of care as stated in Clause 5, Tangem - guarantees that the Tangem Wallet will function properly and without restriction for a period of 2 (two) - years.

      -


    2. -
    3. Tangem guarantees - that the Tangem Wallet prevents duplication of the Private Key and that the Cardholder has exclusive - control over the Blockchain Asset unless the contrary is imposed by specific blockchain network - rules,

      -

      e.g. two or more - private keys can be used to control the same Blockchain Asset.

      -


    4. -
    -
  16. -
  17. - LIMITATION OF LIABILITY

    -


    -
      -
    1. - The Tangem Wallet, including without limitation any content, data and information related thereto, is - provided on an “as is” basis and “as available” basis, without any warranties of any kind, express or - implied warranties of use, merchantability or suitability for a certain purpose or use, including - without limitation, the quality of products and services provided by users, third-party services, and/or - exchanges (except for the guarantees set forth in Clause 8).

      -


      -

      Official Mobile - Application is provided on an “as is” basis and “as available” basis without any warranties of any - kind regarding Official Mobile Application and/or any content, data, materials and/or services - provided on Official Mobile Application.

      -


    2. -
    3. Tangem and its - affiliates, including any of their officers, directors, shareholders, employees, sub-contractors, - agents, parent companies, subsidiaries and other affiliates (collectively, the “Tangem Affiliates”), - jointly and severally, disclaim and make no representations or warranties as to the usability, accuracy, - quality, availability, reliability, suitability, completeness, truthfulness, usefulness or effectiveness - of any content, data, results or other information obtained or generated by Tangem and/or any user - related to you or any other user of the Tangem Wallet, and Official Mobile Applications.

      -


    4. -
    5. In no event shall - Tangem and/or any of the Tangem Affiliates be liable for any damages whatsoever, including direct, - indirect, extraordinary, incidental or consequential damages of any kind, but not limited to, resulting - from or arising out of the use of Tangem Wallet and/or Official Mobile Applications or inability to use - Tangem Wallet and/or Official Mobile Applications, failure of Tangem Wallet and/or Official Mobile - Applications to perform as represented or expected, loss of goodwill or profits, or loss of data arising - out of or in any way connected with the use of Tangem Wallet and/or Official Mobile Applications. In no - event shall Tangem and/or any of the Tangem Affiliates be liable for the performance or failure of the - Tangem Wallet and/ or Official Mobile Applications to perform under these Terms of Use and any other act - or omission by Tangem by any cause whatsoever including without limitation damages arising from the - conduct of any users, third party services and/or exchanges. In no way Tangem or contributors to - Official Mobile Application are responsible for the actions, decisions, or other behavior taken or not - taken by Cardholder in reliance upon Tangem Official Mobile Application.

      -


    6. -
    7. You hereby - acknowledge and agree that these limitations of liability are agreed allocations of risk constituting in - part the consideration for using the Tangem Wallet and Official Mobile Applications and such limitations - will apply notwithstanding the failure of essential purpose of any limited remedy, and even if Tangem - and/or any Tangem Affiliates has been advised of the possibility of such liabilities and/or damages.

      -


    8. -
    9. Tangem will not be - responsible for any losses, damages or claims arising from events falling within the scope of the - following five categories:

      -
        -
      1. - Mistakes made by Cardholder, e.g., forgotten passwords, payments sent to wrong addresses, and - accidental deletion of blockchain wallets on Tangem Wallet or SaltPay Oly cards.

      2. -
      3. Problems of - Official Mobile Application and/or any blockchain- or cryptocurrency- related software or - service, e.g., corrupted files, incorrectly constructed transactions, unsafe cryptographic - libraries, malware.

      4. -
      5. Technical - failures in the hardware of Cardholder, including cards, of any blockchain- or - cryptocurrency-related software or service, e.g., data loss due to a faulty or damaged storage - device.

      6. -
      7. Security - problems experienced by Cardholder, e.g., unauthorized - access to Cardholders' wallets and/or accounts.

      8. -
      9. Actions or - inactions of third parties and/or events experienced by third parties, e.g., bankruptcy of - service providers, information security attacks on service providers, and fraud conducted by - third parties.

        -


      10. -
      -
    10. -
    -
  18. -
  19. SEVERABILITY

    -


    -
      -
    1. In - the event any court shall declare any section or sections of this Agreement invalid or void, such - declaration shall not invalidate the entire Agreement and all other paragraphs of the Agreement shall - remain in full force and effect.

      -


    2. -
    -
  20. -
  21. ARBITRATION AND - GOVERNING LAW

    -


    -
      -
    1. - These Terms of Service are governed exclusively by the laws of Switzerland, without regard to its - conflict of law rules. You consent to the exclusive jurisdiction of the court of Zug, Switzerland for - any dispute arising under this Agreement.

    2. -
    -
  22. -
-

Utorg OÜ Terms of Use

-


-

These Terms of Use constitute an - electronic agreement between you (hereinafter the "User") and Utorg OÜ (hereinafter the “Utorg.pro”, - “we”, “us”, “our”), a company incorporated in Estonia with Company No. 14786273, located at - Roosikrantsi tn 2-1068, Kesklinna linnaosa,Tallinn, Harju maakond, 10119, that applies to the User's use of this - website, any and all services, products and content provided by Utorg.pro.

-


-

As used herein, - "Utorg.pro" refers to the company Utorg OÜ, including but not limited to, its owners, directors, - investors, officers, employees, agents or other related parties, unless otherwise provided herein.

-


-

These Terms of Use contain - important provisions, which the User must consider carefully when choosing whether to use the services, products and - content of Utorg.pro. Please read these Terms of Use carefully before agreeing to them.

-


-

The User is solely responsible for - understanding and complying with any and all laws, rules and regulations of his/her specific jurisdiction that may - be applicable to the User in connection with the use of any and all services, products and content of Utorg.pro.

-


-

These Terms of Use incorporate our Privacy Policy - as well as any other policies published on the Site by reference, so by accepting these Terms of Use, the User agrees with and accepts all the policies published on the Site. -

-


-

IF THE USER DOES NOT ACCEPT THESE - TERMS OF USE, THE USER SHALL NOT USE ANY OF UTORG.PRO’S SERVICES, PRODUCTS AND CONTENT.

-


-
    -
  1. Terms and - Definitions

    -


    -

    Account” - shall mean a record created and maintained by the Software that accumulates and stores all information about - the Cardholder, including without limitation Transactional history, Cryptocurrency balance, and the - Cardholder personal information.

    -

    SaltPay - Oly Card” shall mean a plastic card linked to the Account. “Cardholder” shall mean an individual - or entity holding a SaltPay Oly Card.

    -

    "Confidential - Information" shall mean any data or information, oral or written, treated as confidential that - relates to either party’s (or, if either party is bound to protect the confidentiality of any third party’s - information, such third party’s) past, present, or future research, development or business activities, - including any unannounced products and services, any information relating to Services, developments, - relevant documentation (in whatever form or media provided), inventions, processes, plans, financial - information, end-user data, revenue, transaction volume, forecasts, projections, and the financial terms of - this Agreement. Notwithstanding the foregoing, Confidential Information shall not be deemed to include - information if: (i) it was already known to the receiving party prior to the Effective Date of this - Agreement, as established by documentary evidence; (ii) it is in or has entered the public domain through no - breach of this Agreement or other wrongful act of the receiving party; (iii) it has been rightfully received - by the receiving party from a third party and without breach of any obligation of confidentiality of such - third party to the owner of the Confidential Information; (iv) it has been approved for release by written - authorization of the owner of the Confidential Information; or, (v) it has been independently developed by a - party without access to or use of the Confidential Information of the other party.”

    -

    Cryptocurrency” - shall mean any medium of exchange using cryptography to secure transactions and to control the creation of - new units, as bitcoins (http://bitcoin.org), or any other that meet those requirements.

    -

    Force-Majeure - Event” shall mean any act or event beyond a Party’s reasonable control, including without limitation - non-delivery or defective delivery of third party services necessary to provide the Services (including but - not limited to those of our partners, vendors and suppliers), strikes, lock-outs or other industrial action - by third parties, civil commotion, riot, invasion, terrorist attack or threat of terrorist attack, war - (whether declared or not) or threat or

    -

    - preparation for war, fire, explosion, storm, flood, earthquake, subsidence, epidemic or other natural - disaster, failure of public or private telecommunications networks, worldwide Web unavailability or - malfunction, governmental prohibition or other limitation of Cryptocurrencies, or seizing of infrastructure - and operations of Cryptocurrencies.

    -

    Over-the-counter - (OTC) deal” shall mean a direct, off-exchange, Transaction between Utorg and Cardholder. “Price” - shall mean a "price per coin" for which users are willing to purchase or sell Cryptocurrency using - the Services. “Relevant Exchange Rate” shall mean the weighted spot price average at the time of the - transaction.

    -

    Services” shall mean - providing services of exchanging a virtual currency against a fiat currency. “Site” means Utorg.pro’s website at https://Utorg.pro.

    -

    Specified Bank Account” - means the bank account belonging to Salt Pay IIB hf., the details of which shall be provided to Utorg.pro. -

    -

    Software” shall mean a - software owned by Utorg and enabling Transactions’ processing.

    -

    Transaction” - shall mean any of the following: (i) a purchase of the Cryptocurrency by the Cardholder; (ii) a sale of the - Cryptocurrency by the Cardholder; (iii) a transfer of Cryptocurrency to a Cardholder.

    -


  2. -
  3. Scope of the - Services

    -


    -
      -
    1. Utorg undertakes to - provide the Cardholder with Services, including but not limited to OTC deal. For the avoidance of doubt, - Utorg shall use the Relevant Exchange Rate when executing the OTC deal.

      -


    2. -
    3. The Services will - be provided in such a manner that Utorg will be acting on its own behalf strictly under the Cardholder’s - instructions regarding any Transaction as well as other matters which the Cardholder consider to be - necessary hereunder and are accepted by Utorg.

      -


    4. -
    5. Utorg will treat - the each individual Cardholder as its sole client to which it owes obligations and will bear no - responsibility to third parties for whom the Cardholder may be acting as an agent, intermediary or - fiduciary, whether or not the existence or identity of such person(s) has been disclosed to, or is known - by Utorg.

      -


    6. -
    7. Utorg does not - provide banking, or payment Services and does not hold or store the Cardholder’s fiat or crypto - currencies.

      -


    8. -
    -
  4. -
  5. Warranties

    -


    -

    The Cardholder hereby warrants - and represents to Utorg as follows:

    -
      -
    1. It - represents and warrants that all than all outgoing Transactions, cryptocurrency and/or fiat currency, - are made only to the Specified Bank Account, and Utorg shall not be liable for the consequences of any - other incoming Transactions.

      -


    2. -
    3. It also represents - and warrants than all incoming Transactions, cryptocurrency and/or fiat currency, are made only from its - own wallet and/or bank account, and Utorg shall not be liable for the consequences of any other incoming - Transactions.

      -


    4. -
    5. It shall use the - Services in strict conformity with the Terms of Use and for no other purpose and in no other manner. All - other warranties and representations regarding the use of the Services set forth below shall be in - addition to and not in limitation of this general overriding warranty and representation.

      -


    6. -
    7. The Cardholder represents and warrants to accept - and comply with all policies posted on Utorg.pro website: https://utorg.pro, Terms of Use (https://utorg.pro/terms/), Privacy Policy (https://utorg.pro/privacy-policy), KYC/AML Policy (https://utorg.pro/kyc-aml-policy). -

    8. -
    -
  6. -
  7. Rights - and Obligations

    -


    -
      -
    1. The Cardholder - has right to:

      -


      -
        -
      1. ask - Utorg for any type of assistance and support;

        -


      2. -
      3. - request a confirmation letter stating all information on Cardholder’s Transactions; and

        -


      4. -
      5. - be promptly notified of any relevant changes, including but not limited to Commissions, bank details, cryptocurrency wallets, etc. -

        -


      6. -
      -
    2. -
    3. Utorg has the right - to stop providing the Services and terminate the Agreement immediately in case of any breach of the - Agreement or/and the Terms of Use;

      -


    4. -
    5. Utorg - undertakes to provide the Cardholder with full assistant and support regarding the Service - provision.

      -


    6. -
    -
  8. -
  9. KYC Verification

    -


    -
      -
    1. Identification and - verification procedures (also known as “Know Your Customer” or “KYC”) are required for all - Transactions, which shall be undertaken by Utorg. If the User refuses to provide required documents and - information under KYC, including additional information that can be requested after the business - relationships were established, Utorg.pro reserves the right to immediately terminate the Services - provision to the User.

      -


    2. -
    3. The User hereby - authorises Utorg.pro to, directly or indirectly (through third parties), make any inquiries as - considered necessary to check the relevance and accuracy of the information provided for verification - purposes. Personal Data transferred will be limited to strictly the necessary and with security measures - in use to protect the data.

      -


    4. -
    -
  10. -
  11. Regulatory - Compliance

    -


    -
      -
    1. For the purposes of - anti-money laundering prevention and combatting terrorist activities, Utorg performs a thorough due - diligence on each of its customers. Cardholder will have to provide all documents and information - requested by Utorg for KYC purposesin order to be able to use the Services. Utorg will keep records of - the Cardholder’s information and documents safe and confidential in accordance with its Privacy Policy - and the applicable legal and regulatory requirements.

      -


    2. -
    3. Utorg reserves the - right to request any additional information about the Cardholder and/or the Cardholder’s Transaction, - and the Cardholder agrees to provide such documents and information in due time. Utorg has a right to - decline to deliver the Services anytime in case the documents or information provided by the Cardholder - are unsatisfactory or insufficient, or in case such actions are necessary to comply with the applicable - laws and regulations, as Utorg may decide in its sole discretion.

      -


    4. -
    5. The Cardholder will - be able to perform Transactions within certain amounts according to the limits established by Utorg and - the applicable law. Cardholder will be able to provide some additional information as instructed by - Utorg to increase or eliminate these limits.

      -


    6. -
    -
  12. -
  13. Intellectual - Property

    -


    -
      -
    1. All content at - Utorg's website is the property of Utorg and is protected by copyright, patent, trademark and any - other applicable laws, unless otherwise specified hereby.

      -


    2. -
    3. The trademarks, - brands, trade names, service marks and logos of Utorg and others used on the Site (hereinafter, the - "Trademarks") are the property of Utorg and its respective owners. The software, - applications, text, images, graphics, data, prices, trades, charts, graphs, video and audio materials - used on this Site belong to Utorg. The Trademarks and other content on the Platform and at Utorg's - website should not be copied, reproduced, modified, republished, uploaded, posted, transmitted, scraped, - collected or distributed in any form or by any means, whether manual or automated. The use of any - content from the Platform and at Utorg's website on any other site or a networked computer - environment for any other purpose

      -

      is - strictly prohibited; any such unauthorized use may violate copyright, patent, trademark and any - other applicable laws and could result in criminal or civil penalties/liabilities.

      -


    4. -
    -
  14. -
  15. Confidentiality

    -


    -
      -
    1. Any information of - a Party (hereinafter, the “Disclosing Party”) which is not public and which was obtained by the - other Party (hereinafter, the “Receiving Party”) in the course of performance of this Agreement, - whether proprietary to such other Party or any third party, whether expressly marked as confidential or - not and regardless of the form and manner, in which it was obtained, shall be deemed “Confidential - Information”.

      -


    2. -
    3. With respect to - any and all Confidential Information of the Disclosing Party the Receiving Party agrees to:

      -


      -
        -
      1. hold it in - confidence and treat it with the same degree of care and diligence, as it employs with respect - to its own confidential information, but in no case less than a reasonable degree of care and - diligence;

        -


      2. -
      3. use - it solely for the purpose of performance of this Agreement;

        -


      4. -
      5. communicate - it only to the employers and agents of the Receiving Party who have a need to know such - Confidential Information for the purpose of performance by the Receiving Party of this Agreement - and who are subject to confidentiality obligations with respect to such information; and

        -


      6. -
      7. upon - request of the Disclosing Party or following termination of this Agreement promptly return to - the Disclosing Party any and all material embodiments of its Confidential Information and - destroy those material embodiments of Confidential Information return of which is not - practicable and certify such destruction to the Disclosing Party in writing.

        -


      8. -
      -
    4. -
    5. The Parties hereby - agree and acknowledge that restrictions on use of Confidential Information set forth in Clauses 9.1 and - 9.2 above shall not apply to information, which (subject to the burden of proof being on the Receiving - Party):

      -


      -
        -
      1. was known - to the Receiving Party prior to it being obtained from the Disclosing Party in connection with - this Agreement;

        -


      2. -
      3. has been - developed or otherwise obtained by the Receiving Party without the use of the Confidential - Information;

        -


      4. -
      5. has - become public through no fault of the Receiving Party.

        -


      6. -
      -
    6. -
    7. The Parties hereby - agree that limitations on use and disclosure of Confidential Information as per the Agreement shall not - apply to any disclosure made in accordance with a valid law, court order, or other statutory act or - decision of a judicial or governmental authority that has relevant jurisdiction over the Receiving Party - (the ”Act”), provided that:

      -


      -
        -
      1. The - Receiving Party has provided the Disclosing Party with notice of the Act as soon as - practicable;

        -


      2. -
      3. the - Receiving Party has provided all reasonable assistance to the Disclosing Party (at the - Disclosing Party’s expense) in contesting the Act as the Disclosing Party had requested;

        -


      4. -
      5. the - Receiving Party has disclosed only the portion of Confidential Information which it was obliged - to disclose as per the Act (subject to any alterations due to the Disclosing Party contesting - the Act).

        -


      6. -
      -
    8. -
    -
  16. -
  17. Taxation

    -

    Utorg - makes no representations concerning the tax implications of the Transactions or the possession or use the - Cryptocurrency. The Cardholder bears the sole responsibility to determine if the Cryptocurrency or the - potential appreciation or depreciation in the value of the Cryptocurrency over time has tax implications for - the Cardholder in the

    -

    Cardholder's - home jurisdiction. By using the Services, and to the extent permitted by law, the Cardholder agrees not to - hold Utorg liable for any tax liability associated with or arising from the Cardholder's use of the - Services.

    -


  18. -
  19. - Governing Law

    -

    This - Agreement shall be governed by the laws of Republic of Estonia. All disputes and controversies arising out - of or in connection with this Agreement shall be submitted to the relevant Estonian Court in Tallinn, as the - Court of first instance.

    -


  20. -
  21. - Dispute Resolution

    -


    -
      -
    1. The Parties - undertake to make every possible effort to resolve disputes that may arise in the performance of this - Agreement by means of negotiations.

      -


    2. -
    3. Any dispute, - controversy or claim arising out of or relating to this contract, or the breach termination or - invalidity thereof, that cannot be solved in the process of negotiations shall be settled in the - appropriate court according to the Governing Law.

    4. -
    -
  22. -
-
-
-
-
-
-
- - diff --git a/app/src/main/java/com/tangem/tap/features/details/ui/details/DetailsViewModel.kt b/app/src/main/java/com/tangem/tap/features/details/ui/details/DetailsViewModel.kt index 502437104c..010b27c362 100644 --- a/app/src/main/java/com/tangem/tap/features/details/ui/details/DetailsViewModel.kt +++ b/app/src/main/java/com/tangem/tap/features/details/ui/details/DetailsViewModel.kt @@ -78,8 +78,7 @@ class DetailsViewModel(private val store: Store) { store.dispatch(DetailsAction.CreateBackup) } SettingsElement.TermsOfService -> { - store.dispatch(DisclaimerAction.ShowAcceptedDisclaimer) - store.dispatch(NavigationAction.NavigateTo(AppScreen.Disclaimer)) + store.dispatch(DisclaimerAction.Show()) } SettingsElement.TermsOfUse -> { store.dispatch(DetailsAction.ShowDisclaimer) diff --git a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerAction.kt b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerAction.kt index 0a444895d7..ca82ff1fee 100644 --- a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerAction.kt +++ b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerAction.kt @@ -1,8 +1,17 @@ package com.tangem.tap.features.disclaimer.redux +import com.tangem.common.extensions.VoidCallback import org.rekotlin.Action -sealed class DisclaimerAction: Action { - object AcceptDisclaimer : DisclaimerAction() - object ShowAcceptedDisclaimer : DisclaimerAction() +sealed class DisclaimerAction : Action { + + data class SetDisclaimerType( + val type: DisclaimerType, + ) : DisclaimerAction() + + data class Show(val onAcceptCallback: VoidCallback? = null) : DisclaimerAction() + data class AcceptDisclaimer(val type: DisclaimerType) : DisclaimerAction() + + internal data class UpdateState(val type: DisclaimerType, val accepted: Boolean) : DisclaimerAction() + internal data class SetOnAcceptCallback(val onAcceptCallback: VoidCallback? = null) : DisclaimerAction() } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerMiddleware.kt b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerMiddleware.kt index 12a1cfaccd..1b42d7b4fc 100644 --- a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerMiddleware.kt +++ b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerMiddleware.kt @@ -1,28 +1,65 @@ package com.tangem.tap.features.disclaimer.redux -import com.tangem.tap.common.post import com.tangem.tap.common.redux.AppState +import com.tangem.tap.common.redux.navigation.AppScreen import com.tangem.tap.common.redux.navigation.NavigationAction -import com.tangem.tap.features.home.redux.HomeAction import com.tangem.tap.preferencesStorage import com.tangem.tap.store +import org.rekotlin.Action import org.rekotlin.Middleware class DisclaimerMiddleware { val disclaimerMiddleware: Middleware = { dispatch, state -> { next -> { action -> - when (action) { - is DisclaimerAction.AcceptDisclaimer -> { - preferencesStorage.saveDisclaimerAccepted() - store.dispatch(NavigationAction.PopBackTo()) - - //delayed sending used for better animation - post(550) { store.dispatch(HomeAction.ReadCard) } - } - } + state()?.let { handleDisclaimerMiddleware(action, it) } next(action) } } } -} \ No newline at end of file +} + +private fun handleDisclaimerMiddleware(action: Action, appState: AppState) { + val state = appState.disclaimerState + + when (action) { + is DisclaimerAction.SetDisclaimerType -> { + handleUpdateState = action.type.createUpdateState() + } + is DisclaimerAction.Show -> { + handleUpdateState = state.type.createUpdateState() + store.dispatch(DisclaimerAction.SetOnAcceptCallback(action.onAcceptCallback)) + store.dispatch(NavigationAction.NavigateTo(AppScreen.Disclaimer)) + } + is DisclaimerAction.AcceptDisclaimer -> { + action.type.accept() + handleUpdateState = action.type.createUpdateState() + store.dispatch(NavigationAction.PopBackTo()) + state.onAcceptCallback?.invoke() + store.dispatch(DisclaimerAction.SetOnAcceptCallback(null)) + } + } +} + +private fun DisclaimerType.accept() = when (this) { + DisclaimerType.SaltPay -> preferencesStorage.disclaimerPrefStorage.hasSaltPayTosAccepted = true + DisclaimerType.Tangem -> preferencesStorage.disclaimerPrefStorage.hasTangemTosAccepted = true +} + +fun DisclaimerType.isAccepted(): Boolean = when (this) { + DisclaimerType.SaltPay -> preferencesStorage.disclaimerPrefStorage.hasSaltPayTosAccepted + DisclaimerType.Tangem -> preferencesStorage.disclaimerPrefStorage.hasTangemTosAccepted +} + +private fun DisclaimerType.createUpdateState(): DisclaimerAction.UpdateState { + return DisclaimerAction.UpdateState(this, this.isAccepted()) +} + +private var handleUpdateState: DisclaimerAction.UpdateState = DisclaimerAction.UpdateState( + type = DisclaimerType.Tangem, + accepted = false, +) + set(value) { + field = value + store.dispatch(value) + } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerReducer.kt b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerReducer.kt index 40408ea343..1b282877f2 100644 --- a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerReducer.kt +++ b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerReducer.kt @@ -13,9 +13,15 @@ private fun internalReduce(action: Action, state: AppState): DisclaimerState { if (action !is DisclaimerAction) return state.disclaimerState val disclaimerState = state.disclaimerState + return when (action) { - is DisclaimerAction.AcceptDisclaimer, DisclaimerAction.ShowAcceptedDisclaimer -> { - disclaimerState.copy(accepted = true) - } + is DisclaimerAction.UpdateState -> disclaimerState.copy( + type = action.type, + accepted = action.accepted, + ) + is DisclaimerAction.SetOnAcceptCallback -> disclaimerState.copy( + onAcceptCallback = action.onAcceptCallback, + ) + else -> disclaimerState } } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerState.kt b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerState.kt index b92252ae01..530a4afb78 100644 --- a/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerState.kt +++ b/app/src/main/java/com/tangem/tap/features/disclaimer/redux/DisclaimerState.kt @@ -1,7 +1,30 @@ package com.tangem.tap.features.disclaimer.redux +import android.net.Uri +import com.tangem.common.card.Card +import com.tangem.common.extensions.VoidCallback +import com.tangem.domain.common.ScanResponse +import com.tangem.domain.common.TapWorkarounds.isSaltPay import org.rekotlin.StateType data class DisclaimerState( - val accepted: Boolean = false + val accepted: Boolean = false, + val type: DisclaimerType = DisclaimerType.Tangem, + val onAcceptCallback: VoidCallback? = null, ) : StateType + +sealed class DisclaimerType( + val uri: Uri, +) { + object Tangem : DisclaimerType(Uri.parse("https://tangem.com/tangem_tos.html")) + object SaltPay : DisclaimerType(Uri.parse("https://tangem.com/soltpay_tos.html")) + + companion object { + fun get(scanResponse: ScanResponse): DisclaimerType = get(scanResponse.card) + + fun get(card: Card): DisclaimerType = when { + card.isSaltPay -> SaltPay + else -> Tangem + } + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/features/disclaimer/ui/DisclaimerFragment.kt b/app/src/main/java/com/tangem/tap/features/disclaimer/ui/DisclaimerFragment.kt index abbd7bf8de..b13e5b588b 100644 --- a/app/src/main/java/com/tangem/tap/features/disclaimer/ui/DisclaimerFragment.kt +++ b/app/src/main/java/com/tangem/tap/features/disclaimer/ui/DisclaimerFragment.kt @@ -55,25 +55,25 @@ class DisclaimerFragment : Fragment(R.layout.fragment_disclaimer), binding.toolbar.setNavigationOnClickListener { store.dispatch(NavigationAction.PopBackTo()) } - initAndLoadTOS() - setOnClickListeners() + initViews() } - private fun initAndLoadTOS() { + private fun initViews() { binding.webView.configureSettings() - binding.webView.loadUrl("file:///android_asset/tos.html") } - private fun setOnClickListeners() { - binding.btnAccept.setOnClickListener { store.dispatch(DisclaimerAction.AcceptDisclaimer) } - } - - override fun newState(state: DisclaimerState) { + override fun newState(state: DisclaimerState) = with(binding) { if (activity == null || view == null) return if (state.accepted) { - binding.halfTransparentOverlay.hide() - binding.btnAccept.hide() + halfTransparentOverlay.hide() + btnAccept.hide() } + + btnAccept.setOnClickListener { + store.dispatch(DisclaimerAction.AcceptDisclaimer(state.type)) + } + + webView.loadUrl(state.type.uri.toString()) } } \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/features/home/redux/HomeAction.kt b/app/src/main/java/com/tangem/tap/features/home/redux/HomeAction.kt index c22bd6c043..66016aef08 100644 --- a/app/src/main/java/com/tangem/tap/features/home/redux/HomeAction.kt +++ b/app/src/main/java/com/tangem/tap/features/home/redux/HomeAction.kt @@ -13,6 +13,5 @@ sealed class HomeAction : Action { data class ShouldScanCardOnResume(val shouldScanCard: Boolean) : HomeAction() object Init : HomeAction() - data class SetTermsOfUseState(val isDisclaimerAccepted: Boolean) : HomeAction() data class ChangeScanCardButtonState(val state: IndeterminateProgressButton) : HomeAction() } diff --git a/app/src/main/java/com/tangem/tap/features/home/redux/HomeMiddleware.kt b/app/src/main/java/com/tangem/tap/features/home/redux/HomeMiddleware.kt index 60eaff1abf..ad67172568 100644 --- a/app/src/main/java/com/tangem/tap/features/home/redux/HomeMiddleware.kt +++ b/app/src/main/java/com/tangem/tap/features/home/redux/HomeMiddleware.kt @@ -20,6 +20,9 @@ import com.tangem.tap.common.redux.global.GlobalAction import com.tangem.tap.common.redux.navigation.AppScreen import com.tangem.tap.common.redux.navigation.FragmentShareTransition import com.tangem.tap.common.redux.navigation.NavigationAction +import com.tangem.tap.features.disclaimer.redux.DisclaimerAction +import com.tangem.tap.features.disclaimer.redux.DisclaimerType +import com.tangem.tap.features.disclaimer.redux.isAccepted import com.tangem.tap.features.home.BELARUS_COUNTRY_CODE import com.tangem.tap.features.home.RUSSIA_COUNTRY_CODE import com.tangem.tap.features.home.redux.HomeMiddleware.Companion.BUY_WALLET_URL @@ -63,7 +66,6 @@ private fun handleHomeAction(appState: () -> AppState?, action: Action, dispatch is HomeAction.Init -> { store.dispatch(GlobalAction.RestoreAppCurrency) store.dispatch(GlobalAction.ExchangeManager.Init) - store.dispatch(HomeAction.SetTermsOfUseState(preferencesStorage.wasDisclaimerAccepted())) store.dispatch(GlobalAction.FetchUserCountry) } is HomeAction.ShouldScanCardOnResume -> { @@ -73,17 +75,16 @@ private fun handleHomeAction(appState: () -> AppState?, action: Action, dispatch } } is HomeAction.ReadCard -> { - if (!preferencesStorage.wasDisclaimerAccepted()) { - store.dispatch(NavigationAction.NavigateTo(AppScreen.Disclaimer)) - } else { - changeButtonState(ButtonState.PROGRESS) - val scanCardAction = GlobalAction.ScanCard( - onSuccess = ::onScanSuccess, - onFailure = ::onScanFailure, - ) - store.dispatch(HomeAction.ScanInProgress(true)) - postUiDelayBg(300) { store.dispatch(scanCardAction) } - } + changeButtonState(ButtonState.PROGRESS) + val scanCardAction = GlobalAction.ScanCard( + onSuccess = { + store.dispatch(HomeAction.ScanInProgress(false)) + checkForDisclaimer(it, ::onScanSuccess) + }, + onFailure = ::onScanFailure, + ) + store.dispatch(HomeAction.ScanInProgress(true)) + postUiDelayBg(300) { store.dispatch(scanCardAction) } } is HomeAction.GoToShop -> { when (action.userCountryCode) { @@ -98,12 +99,28 @@ private fun handleHomeAction(appState: () -> AppState?, action: Action, dispatch } } +private fun checkForDisclaimer(scanResponse: ScanResponse, onDisclaimerAccepted: (ScanResponse) -> Unit) { + val disclaimerType = DisclaimerType.get(scanResponse) + store.dispatch(DisclaimerAction.SetDisclaimerType(disclaimerType)) + + if (disclaimerType.isAccepted()) { + onDisclaimerAccepted((scanResponse)) + } else { + changeButtonState(ButtonState.ENABLED) + store.dispatch( + DisclaimerAction.Show { + changeButtonState(ButtonState.PROGRESS) + onDisclaimerAccepted(scanResponse) + }, + ) + } +} + private fun onScanSuccess(scanResponse: ScanResponse) { val globalState = store.state.globalState val tapWalletManager = globalState.tapWalletManager tapWalletManager.updateConfigManager(scanResponse) - store.dispatch(HomeAction.ScanInProgress(false)) store.dispatch(TwinCardsAction.IfTwinsPrepareState(scanResponse)) if (scanResponse.isSaltPay()) { diff --git a/app/src/main/java/com/tangem/tap/persistence/DisclaimerPrefStorage.kt b/app/src/main/java/com/tangem/tap/persistence/DisclaimerPrefStorage.kt new file mode 100644 index 0000000000..7c016eaa5d --- /dev/null +++ b/app/src/main/java/com/tangem/tap/persistence/DisclaimerPrefStorage.kt @@ -0,0 +1,25 @@ +package com.tangem.tap.persistence + +import android.content.SharedPreferences +import androidx.core.content.edit + +/** +[REDACTED_AUTHOR] + */ +class DisclaimerPrefStorage( + private val preferences: SharedPreferences, +) { + + var hasTangemTosAccepted: Boolean + get() = preferences.getBoolean(KEY_TANGEM_TOS, false) + set(value) = preferences.edit { putBoolean(KEY_TANGEM_TOS, value) } + + var hasSaltPayTosAccepted: Boolean + get() = preferences.getBoolean(KEY_SALT_PAY_TOS, false) + set(value) = preferences.edit { putBoolean(KEY_SALT_PAY_TOS, value) } + + companion object { + private const val KEY_TANGEM_TOS = "tangem_tos_accepted" + private const val KEY_SALT_PAY_TOS = "saltPay_tos_accepted" + } +} \ No newline at end of file diff --git a/app/src/main/java/com/tangem/tap/persistence/PreferencesStorage.kt b/app/src/main/java/com/tangem/tap/persistence/PreferencesStorage.kt index d348cacfb7..1fad689559 100644 --- a/app/src/main/java/com/tangem/tap/persistence/PreferencesStorage.kt +++ b/app/src/main/java/com/tangem/tap/persistence/PreferencesStorage.kt @@ -7,15 +7,16 @@ import androidx.core.content.edit import com.tangem.common.json.MoshiJsonConverter import java.util.* - class PreferencesStorage(applicationContext: Application) { - private val preferences: SharedPreferences = applicationContext.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE) + private val preferences: SharedPreferences = + applicationContext.getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE) val appRatingLaunchObserver: AppRatingLaunchObserver val usedCardsPrefStorage: UsedCardsPrefStorage val fiatCurrenciesPrefStorage: FiatCurrenciesPrefStorage val saltPayActivationStorage: SaltPayActivationStorage + val disclaimerPrefStorage: DisclaimerPrefStorage init { incrementLaunchCounter() @@ -25,6 +26,7 @@ class PreferencesStorage(applicationContext: Application) { fiatCurrenciesPrefStorage = FiatCurrenciesPrefStorage(preferences, MoshiJsonConverter.INSTANCE) fiatCurrenciesPrefStorage.migrate() saltPayActivationStorage = SaltPayActivationPrefStorage(applicationContext, MoshiJsonConverter.INSTANCE) + disclaimerPrefStorage = DisclaimerPrefStorage(preferences) } var chatFirstLaunchTime: Long? @@ -38,14 +40,6 @@ class PreferencesStorage(applicationContext: Application) { return usedCardsPrefStorage.wasScanned(cardId) } - fun saveDisclaimerAccepted() { - preferences.edit { putBoolean(DISCLAIMER_ACCEPTED_KEY, true) } - } - - fun wasDisclaimerAccepted(): Boolean { - return preferences.getBoolean(DISCLAIMER_ACCEPTED_KEY, false) - } - fun saveTwinsOnboardingShown() { preferences.edit { putBoolean(TWINS_ONBOARDING_SHOWN_KEY, true) } } @@ -61,12 +55,10 @@ class PreferencesStorage(applicationContext: Application) { companion object { private const val PREFERENCES_NAME = "tapPrefs" - private const val DISCLAIMER_ACCEPTED_KEY = "disclaimerAccepted" private const val TWINS_ONBOARDING_SHOWN_KEY = "twinsOnboardingShown" private const val APP_LAUNCH_COUNT_KEY = "launchCount" private const val CHAT_FIRST_LAUNCH_KEY = "chatFirstLaunchKey" } - } class AppRatingLaunchObserver( diff --git a/app/src/main/res/layout/fragment_disclaimer.xml b/app/src/main/res/layout/fragment_disclaimer.xml index 556960be96..604410e507 100644 --- a/app/src/main/res/layout/fragment_disclaimer.xml +++ b/app/src/main/res/layout/fragment_disclaimer.xml @@ -22,6 +22,7 @@ android:layout_height="?attr/actionBarSize" app:navigationIcon="@drawable/ic_baseline_arrow_back_24" app:title="@string/disclaimer_title" /> + - + app:layout_constraintTop_toTopOf="parent"> + + + +