Giter Site home page Giter Site logo

terra-money / station-extension Goto Github PK

View Code? Open in Web Editor NEW
33.0 20.0 56.0 192.19 MB

๐Ÿ›ฐ๏ธ Station Chrome and Firefox extension

Home Page: https://chrome.google.com/webstore/detail/aiifbnbfobpmeekipheeijimdpnlpgpp

License: MIT License

Shell 0.05% JavaScript 3.01% HTML 0.06% TypeScript 87.63% SCSS 9.25%
cryptocurrency wallet

station-extension's Introduction

Terra Station Wallet extension

Banner

Terra Station Wallet extension is a browser extension to interact with Terra Core.

Terra Station Wallet extension allows users to:

  • View the balances and values of coins and tokens held in the connected wallet.
  • View a list of transactions signed by the connected wallet.
  • Send tokens to another Terra wallet.
  • Swap currencies on the Terra network at the effective exchange rate.

Building Terra Station Wallet extension

This project was bootstrapped with Create React App.

Build Terra Station Wallet extension with the following commands:

git clone https://github.com/terra-money/station-extension.git
cd station-extension
npm i
npm run build

Builds the extension. Open /build to view it.

Note: For the Windows operating system, separate the paths by semicolons in the .env file.

station-extension's People

Contributors

alagiz avatar alecande11 avatar anonymousqwer avatar autostake-com avatar blockjayn avatar dependabot[bot] avatar dimitrijedragasevic avatar edk208 avatar erichgorski avatar gregnuj avatar hanjukim avatar hanwong avatar jared-tfl avatar joshuabrigati avatar kristofenyi avatar krsjoseph avatar marventuswp avatar maxxb95 avatar mwmerz avatar octalmage avatar peratx avatar radzionc avatar rafaelzimmermann avatar seleniumforest avatar sjtfl avatar snyk-bot avatar terencelimzhengwei avatar terran6 avatar vladjdk avatar xstoudi 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

Watchers

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

station-extension's Issues

Hiding small balances doesn't work properly, continued

Sorry for creating another issue on that, but I don't know how to reopen the existing issue that has been closed without any chance for me to reply first. On top of that, I left a comment in the original issue that received no reply, so I presume there was no notification because the issue was closed.

Please forgive me for acting stupid, but I am not a frequent Github user :P

vvv my last comment from the original issue below vvv

@simcheolhwan, thanks for replying. Although I do not agree to close this issue that fast. I understand that there are reasons that some of the tokens shouldn't be hidden away in the circumstances you mentioned. But what about all the tokens with a flat out zero ("0" without even a decimal point) that currently persist to be shown (see my screenshot), those should be hidden, don't you agree?

And if not, what is the point of the whole "Hide small balances" feature at all -- it is to hide away the dust, and for sure not only LUNA and UST, don't you think?

Originally posted by @sriedel1970 in #10 (comment)

Multiple Terra Address support in Ledger

Feature Request:

Currently the Terra Station Extension doesn't support multiple addresses when using Ledger. This would be very helpful when trying to manage multiple accounts using the same ledger device. This is doable with most other currencies on ledger (Bitcoin, ETH, XLM, etc.).

Based on a Ledger support case it seems to be it is doable but just needs to be implemented on the Station Extension

(Ref: https://www.reddit.com/r/terraluna/comments/q28ioy/can_you_have_multiple_ledger_addresses_on_terra)

It would be great if we could do this similar to how MetaMask allows us to add multiple ETH Ledger Addresses and label them.

tx parse error

Network: Terra Classic

Error Info: unable to resolve type URL /cosmwasm.wasm.v1.MsgExecuteContract: tx parse error

Error occurs time: after 2023.02.08 13:55:01 (This is the time I deployed the contract, and before this time, all tx could be parsed and sent out by station extension)

Because my dapp hasn't been online, so if you wanna reproduce the error, you could go to tfm.com and swap token on terra-classic network.

Hiding small balances doesn't work properly

The feature to hide away coins/ tokens with small balances doesn't work correctly, at least for me (MacOS, Brave browser, Terra Station browser extension connected to a Ledger Nano X, all running on latest SW versions). No matter what setting I choose (Show all, Hide <$1, Hide <$10, Hide <$100), basically all symbols are still shown in my wallet. The only effect seems to be that the order of the symbols is somehow affected, strangely.

As you can see in the following image, despite the current setting to hide away balances of less than $10, nothing is hidden away. Both symbols with a flat zero and those with small fractions of a token are still displayed. This feature is obviously not working correctly.

image

No way to whitelist domains

When browsing legitimate websites with one of the keywords added in the last commit, a constant alert is popped up on every page load and there is no way to whitelist a domain name to prevent this from happening. This makes the website very painful to use. Please consider adding an add to whitelist feature

Issue with states() and connectedWallet() observables not triggering

Hi, I'm Philipp from Eris Protocol,

currently we have issues with the state observables of @terra-money/wallet-controller to terra station extension.

The flow is the following:

  • Open erisprotocol, connect your wallet
  • Leave erisprotocol somewhere in the background for 5 - 60 min
  • Disconnect the wallet within the app:
    image
  • Press connect wallet again
    image
  • Connect the station again
  • Now our gui does not update, as we do not receive the wallet connected state again.

The user needs to refresh the page, so that it works again, and with the refresh of the page, the wallet magically appears, so the wallet is internally connected, but the observable not triggered. I do not know if this is a @terra-money/wallet-controller issue or a Terra Station issue.

We tried some workarounds of recreating the WalletInstance or resubscribing the state (reexecute initInstance / reinitSubscription). Unfortunately these workarounds never worked, as e.g. when recreating the wallet instance after that long time, we will only receive the INITIALIZING state and nothing more.

On startup we call

  private async initInstance(waitOnAvailable = false) {
    this.subscriptions.clear();
    const chainOptions = await getChainOptions();
    this.instance = new WalletController({
      ...chainOptions,
    });

    this.isAvailable = true;

    if (waitOnAvailable) {
      await firstValueFrom(
        this.instance.states().pipe(
          tap((a) => console.log('STATE', a)),
          filter((a) => a.status !== WalletStatus.INITIALIZING)
        )
      );
      console.log('WAITED');
    }

    this.reinitSubscription();
  }

  private reinitSubscription() {
    this.subscriptions.clear();
    this.subscriptions.add = this.instance
      .connectedWallet()
      .subscribe((wallet) => {
        this.connectedWallet.next(wallet);
        this.address.next(wallet?.terraAddress.toString() ?? '');
      });
  }

On connect we call

    await this.instance?.connect(connection.type, connection.identifier);

On disconnect we call

    this.instance?.disconnect();

Signing something doesn't close the sign window

Lately when signing something, the station wallet popup stays open and does not close, instead returns to the wallet balance.

This also means that the Promise from the client is not beind resolved anymore and the client / dapps dont know anything about a successful post.

code build error

npm run build and report an error
Type '{ children: Element[]; }' has no properties in common with type 'IntrinsicAttributes'. TS2559

LocalTerra issue with station-extension

When using the wallet extension with LocalTerra this error is displayed in console:

http://localhost:1317/cosmos/bank/v1beta1/spendable_balances/terra1x46rqay4d3cssq8gxxvqz8xt6nwlz4td20k38v 501 (Not Implemented)

I was able to compile the station-extension and test modifying the src/data/queryies/bank.ts line 53:

old: const [coins] = await lcd.bank.spendableBalances(address)
new: const [coins] = await lcd.bank.balance(address)

this resolved the issue but i am unable to create a pull request.

Transaction fails on Extension and succeeds with Terra.js

The following transaction fails silently using Terra Extension whereas it succeeds when using Terra.js directly.

{
  "@type": "/cosmwasm.wasm.v1.MsgExecuteContract",
  "contract": "terra136cqzlps72yma3z8pdlw43nnwvf6d2cn6jcf9a4zxtwmhx4hka7sw7ymdp",
  "funds": [
    {
      "amount": "1000000",
      "denom": "uluna"
    }
  ],
  "msg": {
    "swap": {
      "offer_asset": {
        "amount": "1000000",
        "info": {
          "native_token": {
            "denom": "uluna"
          }
        }
      }
    }
  },
  "sender": "terra1u9k8h9e9u9jg7yq50myt8d20hhmwc0wyznf4yy"
}

Support Terra Classic LocalTerra

When posting a tx on a local testnet of Terra Classic (older version of LocalTerra), there is the error:

CreateTxFailed: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.

Seed should be at least 128 bits

All my existing wallets return this error when signing any with a wrong password.

Only a reimport helps

image

Expected: Return error password is wrong.

Undelegated Luna not appearing in wallet/unable to withdraw past hold period

Hello - several weeks ago I undelegated my staked Luna. Now I want to withdraw but the undelegated amount is not showing up in my wallet. The only place it appears is in the Stake/Delegate tab where I can re-delegate it. It appeared in the Undelegations sections for a while until it became released from the time hold and now it is not in my wallet. Please help thanks.

failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface.

Hi.
I am trying to use a ledger (using the cosmos app on the ledger)
on this site https://app.migaloo.zone/delegate?validatorDestAddress=migaloovaloper1670dvuv348eynr9lsmdrhqu3g7vpmzx94s460k&tokenSymbol=WHALE

and it is coming up with this error.


pp-435d13a791e089cd.js:1132 CreateTxFailed: Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface.
    at tp (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:17778)
    at Object.error (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:632:9077)
    at e.error (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:4859)
    at t._error (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:4424)
    at t.error (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:4082)
    at https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:15029
    at ee (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:3633)
    at t.error (https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:9:14895)
    at https://app.migaloo.zone/_next/static/chunks/pages/_app-435d13a791e089cd.js:279:4546
(anonymous) @ _app-435d13a791e089cd.js:1132
460-194a2e99a1673d7e.js:1 [CreateTxFailed message="Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface."]
{
  "chainID": "migaloo-1",
  "msgs": [
    "{\"@type\":\"/cosmos.staking.v1beta1.MsgDelegate\",\"amount\":{\"amount\":\"1000000\",\"denom\":\"uwhale\"},\"delegator_address\":\"migaloo1fxxxxxx\",\"validator_address\":\"migaloovaloper1670dvuv348eynr9lsmdrhqu3g7vpmzx94s460k\"}"
  ]
}

o

Send Luna Error due to insufficient fees

Terra Station Extension is not using the right fee for sending Tx. The error message is:

insufficient fees; got: "1230uluna", required: "20612uaud,20612ucad,15188uchf,106315ucny,97636udkk,13561ueur,11934ugbp,126927uhkd,236495120uidr,1180306uinr,1775884ujpy,18417329ukrw,614562uluna,46493097umnt,65091umyr,135605unok,824479uphp,11385usdr,135605usek,21697usgd,501197uthb,433936utwd,16273uusd" = "20612uaud,20612ucad,15188uchf,106315ucny,97636udkk,13561ueur,11934ugbp,126927uhkd,236495120uidr,1180306uinr,1775884ujpy,18417329ukrw,614562uluna,46493097umnt,65091umyr,135605unok,824479uphp,11385usdr,135605usek,21697usgd,501197uthb,433936utwd,16273uusd"(gas) +""(stability): insufficient fee

Screen Shot 2022-05-15 at 11 30 05 AM

browser.storage.local.set takes only one argument

Chrome storage.local.set takes only one argument. The argument should be an object.
Before:

            if (changed.uuid) {
              browser.storage.local.set(
                key,
                newValue.filter((tx) => tx.uuid !== changed.uuid)
              )
            } else {
              browser.storage.local.set(
                key,
                newValue.filter((tx) => tx.id !== changed.id)
              )
            }

After:

            if (changed.uuid) {
              browser.storage.local.set({
                [key]: newValue.filter((tx) => tx.uuid !== changed.uuid)
              })
            } else {
              browser.storage.local.set({
                [key]: newValue.filter((tx) => tx.id !== changed.id)
              })
            }

#284

Wrong Insufficient error on classic

I have got error message when I tried to call contract function using terra station extension.
Even I have enough lunc and ust in my wallet, insufficient error.
image

Hope to solve this asap.
Thanks

Add firefox build

Currently there is only a chrome build available. Is it possible to get a firefox build also? Thank you for the awesome work!

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.