GithubHelp home page GithubHelp logo

madfish-solutions / templewallet-extension Goto Github PK

View Code? Open in Web Editor NEW
185.0 13.0 62.0 30.52 MB

🔐💰Cryptocurrency wallet for Tezos blockchain as Web extension for your Browser.

Home Page: https://templewallet.com

License: MIT License

HTML 0.43% CSS 0.81% TypeScript 94.09% JavaScript 1.11% Swift 0.14% Gherkin 3.44%
wallet tezos blockchain cryptocurrency extension temple defi templewallet

templewallet-extension's Introduction

Temple - Tezos Wallet

Cryptocurrency wallet for Tezos blockchain as Web Extension for your Browser.
Providing ability to manage NFT, tez tokens and interact with dApps.

Temple Wallet


▶️ Install

You can install Temple Wallet right now: https://templewallet.com/download.

Browser Support

Chrome Firefox Brave Opera Edge
49 & later ✔ 52 & later ✔ Latest ✔ 36 & later ✔ 79 & later ✔

🚀 Quick Start

Ensure you have:

  • Node.js 10 or later installed
  • Yarn v1 or v2 installed

Then run the following:

1) Clone the repository

git clone https://github.com/madfish-solutions/templewallet-extension && cd templewallet-extension

2) Install dependencies

yarn

3) Create .env file

Make copy of .env.dist and do changes if needed.

4) Build

Builds the extension for production to the dist folder.
It correctly bundles in production mode and optimizes the build for the best performance.

# for Chrome by default
yarn build

Optional for different browsers:

# for Chrome directly
yarn build:chrome
# for Firefox directly
yarn build:firefox
# for Opera directly
yarn build:opera

# for all at once
yarn build-all

5) Load extension to your Browser

TempleWallet_Load

🧱 Development

yarn start

Runs the extension in the development mode for Chrome target.
It's recommended to use Chrome for developing.

Debugging

To enable Redux DevTools during development, specify some port in the .env file before running yarn start like so:

REDUX_DEVTOOLS_PORT=8000

Install @redux-devtools/cli globally:

yarn global add @redux-devtools/cli

Then open an explorer at previously specified port:

redux-devtools --open --port=8000

Other UI options like --open=browser are available.

Go to settings to specify port one more time.

templewallet-extension's People

Contributors

alex-tsx avatar andrewkryshtal avatar boltman92 avatar danielelisi avatar delivator avatar denchiua avatar dependabot[bot] avatar dexterslabor avatar fitblip avatar gre avatar herkoss avatar irynakhyzhynska avatar jensamberg avatar keefertaylor avatar keshan3262 avatar ktorn avatar lendihop avatar letier3110 avatar lourenc avatar michaelpautov avatar ojuswizard avatar oryhivskiy avatar renatoalencar avatar romarq avatar serg-plusplus avatar svjatoslavtt avatar tttt24 avatar unixvb avatar zamrokk avatar zsmchk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

templewallet-extension's Issues

Show more information why a transaction is likely to fail

Hi, is it possible to let users know why their transaction is likely to fail?
Screenshot 2021-04-19 at 14 45 24

Would be cool if I could click on this block and see more information about it.
In case if it's too much for a regular user, then maybe showing it in a "developer mode" would be the solution?

isThanosAvailable not working

Hey there,

I'm using the await ThanosWallet.isAvailable() method to check if the extension is available and I'm getting false even though I'm on the same network and the wallet is unlocked.

The error I'm getting in the console reads as follows:
Screen Shot 2020-07-25 at 6 19 41 PM

https://github.com/ecadlabs/george-cloney ; this is the project I'm running it on. You can run master at https://ecadlabs.github.io/george-cloney/ and you'll see that the Thanos wallet option won't appear on the Origination step (step 3)

Version: "@thanos-wallet/dapp": "^0.5.0"

Feature Requests!

i'm sure you guys have considered all of these already but here are some on the top of my mind:

1: ability to associate some type of email/phone-number/ENS-derived system for sending Tezos to other users besides using their public account keys

2: ability to stake/delegate from the wallet AND cast votes for new proposals (this seems key because its a core differentiator of Tezos ecosystem)

3: fiat on/off ramp! shameless self promotion but https://buy.carbon.money/?tokens=xtz is a simple way to buy XTZ using credit/debit in less than 5 seconds. we also have a whitelabel API

Temple wallet not detected on TZwrap

I have Temple installed in Chrome, and some xtz delegated there. I'm trying to lo link with tzwrapp, but in the "Choose your preferred wallet" Temple shows up as "not installed", and can't be connected.

Displayed seed phrase wrong

The seed phrase/mnemonic displayed in the settings portion is incorrect, and the same for all of my added accounts.

Support different derivation paths

When importing a wallet it can be on a different derivation path. Would be good to support a few preselected and custom derivation paths.

Counter already used for contract

When we get this error, it would be good to have a pre-filled control filed (with the current value of the counter), so the user can easily increment it. Like you have for storage limit.

This happens when you want to use some dApp more than once within one block.

temple-error

Add idiazabalnet support to temple

Summary

The idiazabalnet testnet is now up and running. This net has many changes, including tenderbake. We must promote engagement with the Tezos development ecosystem so that we have more miles and eyes on this significant protocol update.

Please add support for idiazabalnet so that developers can easily develop and test against this new test network.

More info on this network is available here: https://teztnets.xyz/idiazabalnet-about
Public RPC nodes are available here: https://idiazabalnet.ecadinfra.com/

Related issues:

Ledger doesn't work anymore under last Chrome 91

Since last chrome update a few days ago, the communication between TempleWallet and a ledger nano is broken:

  1. If I try to connect a ledger, templewallet do the request to ledger, I can approve the request on the ledger, but TW never receive de communication and fails with an error message "Ledger error. Unable to retrieve public key"
  2. If i try to use a ledger already connected to TempleWallet to do a buy on Hicetnunc, TW send the swap request to ledger but the ledger never show the confirmation screen, and after a few second, it fails with error "Ledger error. The operation either timed out or was not allowed. See: https://www.w3.org/TR/webauthn-2/#sctn-privacy-considerations-client."

Also, Metamask had this same kind of problem and stated this
"As of Chrome version 91, the API that enabled our Ledger support (U2F) no longer supports hardware wallets. MetaMask has implemented a new Ledger Live support that allows you to continue to connect to your Ledger device via the Ledger Live desktop app."
https://metamask.zendesk.com/hc/en-us/articles/360020394612-How-to-connect-a-Trezor-or-Ledger-Hardware-Wallet

So maybe TW is facing the same kind of problem as I guess there are similarities there

Changelog and Github releases

I'm not sure if this should be opened here but I was unable to find releases on GitHub and also not any changelog.
Please let me know where I can find them or is there any plan to implement them?

Feature Request: additional tx broadcast

It would be nice to have an option to also send a signed transaction to a custom URL, in addition to injecting it into the currently set tezos RPC endpoint.

Code Example:

const operation = await counter.methods.method().sendAndNotify({ "endpoint":"https://example.com/tx: );

This would broadcast the operation via the rpc, and at the same time send the signed operation to the configured endpoint.

sometimes, a developer would like to update the page immediately, without waiting for the transaction to include in the next block ( waiting for await operation.confirmation() ) IF they can be reasonably sure that an operation is valid and pending to be included, so by sending the signed transaction some backend code could verify this immediately.

It is not a very typical scenario but it would greatly improve UX for some Applications.

Show pending transactions in operation list

For a better UX i would recommend placing (outgoing) transactions immediately in the transaction list marked as pending.

Now you have to wait for it which leaves some room for question marks.

Activity feed not displayed

Hi, I've been using the Temple Tezos Wallet for a week now and it's been great.

However, today I can't see the Activity feed anymore.

  • Click the Temple icon in the browser tool bar
  • Click Activity
  • Expected behavior: my activities list is displayed
  • Actual behavior: the list is displayed for half a second and then this error message is displayed: "Oops! Something went wrong while fetching or processing operation history".

Then the same thing happens if i click the Try again button below the error message.

Is there anything I can do?

`ctrl + shift + t` opens temple

  • Open temple wallet (via beacon sdk)
  • Close it
  • Ctrl + Shift + T

It shouldn't open temple wallet in my opinion, it should be used only for previously opened tab in my browser.

Google Chrome:
Version 95.0.4638.54 (Official Build) (arm64)

Transaction confirmation broken on large transactions

Calling a standard FA2 transfer entrypoint with a lot of transfers at once breaks the transaction window.
When I break down the transfer into chunks of 13 at a time, it works - however the data shown in the transfer window is inaccurate then.

This transaction works, but shows a broken preview (notice how there are only two recipients shown):

[
   {
      "from_":"tz1c6JQUaRQa8p7tQYySrD3RfLyFurWRfexg",
      "txs":[
         {
            "to_":"tz1PqooZUtCQqP539PmMzUWHtaUX6EQtFY5S",
            "token_id":"10012",
            "amount":"1"
         },
         {
            "to_":"tz1NsE7vEgP3M9bDdkNGF4rCaTUENp5h56ZU",
            "token_id":"53239",
            "amount":"1"
         },
         {
            "to_":"tz2MRhfAKUyNZDKH8XBzmXyCwd2h5ySbgZJJ",
            "token_id":"53239",
            "amount":"1"
         },
         {
            "to_":"tz1aVgxdSRcHZZK9BSmEPHjMA6eM7dsiboN5",
            "token_id":"53239",
            "amount":"1"
         },
         {
            "to_":"tz1bgkctNuMBKKkmqdw1NVTKChv5Sewb5t9y",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1PqooZUtCQqP539PmMzUWHtaUX6EQtFY5S",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz2NXn1uhqMbfwSJ3w2Q6ymrPQkF45BxPu9L",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1fhd4k1jSJRRcNVbkMwVzkKEhX3kzApsfk",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1a6tAY8tZJVFaWj6Tmz9LEq2ugmdvFjjRs",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1VLyW483Xza4WHHQyRKVp7WoBcN9mhiuQW",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1NsE7vEgP3M9bDdkNGF4rCaTUENp5h56ZU",
            "token_id":"53232",
            "amount":"1"
         },
         {
            "to_":"tz2MRhfAKUyNZDKH8XBzmXyCwd2h5ySbgZJJ",
            "token_id":"53232",
            "amount":"1"
         },
         {
            "to_":"tz1aVgxdSRcHZZK9BSmEPHjMA6eM7dsiboN5",
            "token_id":"53232",
            "amount":"1"
         }
      ]
   }
]

Shows this preview:
image

As soon as I add more than 13 items at once, the transaction breaks completely:

[
   {
      "from_":"tz1c6JQUaRQa8p7tQYySrD3RfLyFurWRfexg",
      "txs":[
         {
            "to_":"tz1PqooZUtCQqP539PmMzUWHtaUX6EQtFY5S",
            "token_id":"10012",
            "amount":"1"
         },
         {
            "to_":"tz1NsE7vEgP3M9bDdkNGF4rCaTUENp5h56ZU",
            "token_id":"53239",
            "amount":"1"
         },
         {
            "to_":"tz2MRhfAKUyNZDKH8XBzmXyCwd2h5ySbgZJJ",
            "token_id":"53239",
            "amount":"1"
         },
         {
            "to_":"tz1aVgxdSRcHZZK9BSmEPHjMA6eM7dsiboN5",
            "token_id":"53239",
            "amount":"1"
         },
         {
            "to_":"tz1bgkctNuMBKKkmqdw1NVTKChv5Sewb5t9y",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1PqooZUtCQqP539PmMzUWHtaUX6EQtFY5S",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz2NXn1uhqMbfwSJ3w2Q6ymrPQkF45BxPu9L",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1fhd4k1jSJRRcNVbkMwVzkKEhX3kzApsfk",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1a6tAY8tZJVFaWj6Tmz9LEq2ugmdvFjjRs",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1VLyW483Xza4WHHQyRKVp7WoBcN9mhiuQW",
            "token_id":"53229",
            "amount":"1"
         },
         {
            "to_":"tz1NsE7vEgP3M9bDdkNGF4rCaTUENp5h56ZU",
            "token_id":"53232",
            "amount":"1"
         },
         {
            "to_":"tz2MRhfAKUyNZDKH8XBzmXyCwd2h5ySbgZJJ",
            "token_id":"53232",
            "amount":"1"
         },
         {
            "to_":"tz1aVgxdSRcHZZK9BSmEPHjMA6eM7dsiboN5",
            "token_id":"53232",
            "amount":"1"
         },
         {
            "to_":"tz1gLNb49fErXUiYdreLAAV6twp4v3Lm8V4H",
            "token_id":"53232",
            "amount":"1"
         }
      ]
   }
]

This is what it looks like:
image

On the broken transaction, the console shows

commons.chunk.js:2 TypeError: Cannot read property 'split' of undefined
    at u (commons.chunk.js:2)
    at commons.chunk.js:2
    at Object.useMemo (commons.chunk.js:2)
    at t.useMemo (commons.chunk.js:2)
    at c (commons.chunk.js:2)
    at Ji (commons.chunk.js:2)
    at _s (commons.chunk.js:2)
    at yc (commons.chunk.js:2)
    at mc (commons.chunk.js:2)
    at sc (commons.chunk.js:2)

Show the last used

Right now when I'm trying to connect to a wallet on a specific website, temple focuses on the first account, while it would be more useful to see the last used account.

For example, when I'm trying to reconnect with different account, it focuses on the first account for some reason, while I was using the second account, so it confuses me all the time.

Screen Shot 2021-09-27 at 14 01 15

Add Ledger support

Hi guys,

Is it planned / would it be possible to add Ledger support?

Thanks!
Andrew

My Seed Phrase is not recognized

I have entered the seed phrase to unlock the account and say that is not correct. Keep showing in red color thise message:

12, 15, 18, 21 or 24 words in English
Each word separated with a single space
Just valid pre-generated mnemonic

confirmation window is not wide enough

Current width of the confirmation popup requires horizontal scrolling even for simple transactions (with no nested parameter objects running off to the right).

It would be nice if the window was wide enough to show the whole destination address without scrolling, at least on display sizes that are not space constrained.

Also, the window can be resized, but the content stays the same and only the whitespace on the sides grows. It would be better if the content took up the whole window or at least grew when the window is resized.

Screenshot_20201123_212727

impossible to send 0

Some contracts can require interaction without a value transfer. Such as flipping a switch or adding signature in multisig.

Template incorrectly displays tokens which only specify a symbol as "Unknown Token"

Template incorrectly displays tokens which only specify a symbol as "Unknown Token"

According to the TZIP-021 spec, either name or symbol should be present but both are not required.

TZIP-021 further defines the boolean shouldPreferSymbol field which purpose is to "allow wallets to decide whether or not a symbol should be displayed in place of a name."

Here is an example token on Florencenet which shows this issue: KT1E5pm7RH9P6ocskuc9f2F1QAe9HQLYXZa5

dark theme

It would be nice to have a dark theme for both the Thanos dialogs and the wallet popup. It's jarring when a website has a dark theme but the wallet is white.

Onboarding or scam?

I have recently received many messages from concerned people because now they see a home page that claims to be onboarding despite the fact that they are wallets that are not new and have already been used before.

is it a possible scam or is it a legitimate new screen?
why doesn't the same thing happen in brave browser?

temple

Unable to manage FA2 tokens with a large token id

When I try to add manually a FA2 token with a large token id, Temple is unable to get related metadata and token balance. Auto-detection of this kind of tokens doesn't work too.

To reproduce this issue, you can use:

  • Network: Mainnet
  • FA2 contract: KT1PG3i5HdXkQT8vjXegf7hwXHVCgUJBZUbx
  • Token id: 14379292908393150618135233488573383004656525077407763333845734711826897045468

This contract is used by WRAP Protocol to manage NFT wrapping of Sorare Ethereum tokens.

This issue seems related to Javascript numbers management. As Javascript doesn't like unbounded numbers, it uses a scientific notation for really big numbers.
It means that some precision about this large token id is lost somewhere.

Here is how Temple shows this kind of token ids:

Capture d’écran 2021-09-09 à 21 55 42

When inspecting requests sent by Temple, we can see that it uses the good number representation but token id '14379292908393150618135233488573383004656525077407763333845734711826897045468' became '14379292908393151000000000000000000000000000000000000000000000000000000000000':

Capture d’écran 2021-09-09 à 22 25 06

Ledger not working in Brave

Ledger is not working on Brave Browser on Pop!_OS Linux 20.04 but all other wallets, (Binance, MetaMask, Yoroi, and Solflare) all work perfectly within the browser.

making transfers in close succession gives a network error (beacon)

Making transfers quickly can result in an error. I guess the problem is related to the 1st transfer not being included in a block yet, (but already being in the mempool?) and the 2nd transfer failing due to outdated counter.

I think you might be able to detect this by looking at mempool?

In any case, the error should say something about counters/mempool/try again or perhaps prevent user from making transfers rapidly by disabling buttons? Right now it says "The wallet does not support this network. Please select another one." Which is clearly off the mark.
Screenshot_20201123_212750

Sign arbitrary data for off-chain transactions and state channels

In Ethereum, specifically Metamask, there's a lot of usage of the wallet to sign arbitrary transactions for L2 scaling and login functionality. A similar feature, if implemented in a secure way (there would have to be a prefix so that the bytes being signed aren't a valid in an on-chain tx, unless said on-chain tx is part of the dapp functionality, ex in sidechain BLS threshold aggregation) would allow for very interesting applications.

Ideally this functionality should be implemented as a TZIP, but I was thinking, since metamask developed and then submitted an EIP, you guys could do the same, or?

Signing messages produces an invalid message after today's Chrome extension update

It would seem that message signing is broken after the latest update. Players using Temple wallet are not able to login on our platform, while other wallet providers such as Kukai do not have issues.

It would seem that Temple is hex encoding the message payload a second time, unlike the other wallet providers. This places us in a situation if we fix it for Temple it's going to break for any other wallet provider.

The data depicted in the link below should be JSON but Temple has hex encoded it:
Screenshot of invalid message

Is extension's contentScript needed?

Thanos Wallet will be use tzip-10 for communicate with dApp. That means we don't need to inject something for dApp to user page.
What else might Thanos Wallet need in extension's contentScript?

Feature Request: custom node URL

First of all, great wallet!

Could we have the option to set a custom RPC URL, and assign a name to it,
It would be great if it could support any valid url, such as l to "http://10.0.0.5:1235/rpc", and not just host:port, and set a unique name for convenience.

Undelegating Tezos

Hello. I delegated some Tezos at Thanos Wallet. I would like to undelegate and withdraw, but the only option I see is re-delegate. I am using Thanos Wallet extension in Chrome browser on the Mac. Appreciate your help. Thank you.

Symbol name cut off in send input

Some symbol names are getting cut off in the send input.

See example:
image

I think it can fit, but if it needs to be cut off, the ending of the symbol should be cut off, not the start.

1.8.0: timeout issue when using a ledger wallet

on the latest version of the extension that was released today, i often reach a timeout when signing with a Ledger device. Even tho i quickly sign on my device, it will take unpredictable time to complete and it often timeout at 30s.

Capture d’écran 2021-04-13 à 22 12 45

any clue what could have created this? I only see a bump of ledger-signer but I digged into https://github.com/ecadlabs/taquito/ and didn't necessarily see anything relevant

Temple Wallet caused Firefox on macOS to minimized when using in fullscreen.

ENV

  • macOS Big Sur 11.5.2
  • Firefox Developer Edition 92.0b9 (happened with Firefox stable too)

Reproduce steps

  • Open Firefox in fullscreen mode.
  • Try to interact with temple wallet via beacon (e.g. connect temple on Quipuswap)

Expected behaviors

  • Temple wallet window popup for us to confirm the transaction / request.

Current behaviors

  • A whole Firefox automatically minimized to Dock. (including Temple window)

Pending transactions dont clear, no way to interact with them

While testing a DApp I had a transaction get sent but never confirmed or cancelled so it sat in pending forever. Currently pending transactions have no way to clear anywhere in the wallet UI (that I can see). This blocks all other transactions from moving.

I know this is more of a 'feature request' just thought I would mention it here as maybe someone has a solution or at least the team is aware of it.
Screen Shot 2021-07-22 at 13 37 40

"Invalid digit" RPC error when transferring FA 1.2 tokens with large number of decimals

If you import a token to Thanos that uses 18 decimals, you can't transfer more than 999 of those tokens.

Transfer of >999 tokens will result in sending a scientific notation of the amount, rather than the full value as a string.

Assuming you guys are using Taquito with big-number.js, here's a snippet with a possible solution:

// ok
// 999 tokens
const largeNumber = BigNumber("999000000000000000000")
print(largeNumber.toString()) // "999000000000000000000"

// not ok
// 1000 tokens
const largerNumber = BigNumber("1000000000000000000000")
print(largeNumber.toString()) // "1e+21"

// ok (?)
// 1000 tokens
const largerNumber = BigNumber("1000000000000000000000")
print(largeNumber.toFixed(0)) // "1000000000000000000000"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.