use-ink / link

Unstoppable URL shortener built with the ink! smart contract language.
https://tiny.ink
Apache License 2.0
29 stars 8 forks source link

Bump useink from 0.1.0-beta.4 to 0.1.0-beta.12 in /frontend #244

Closed dependabot[bot] closed 1 year ago

dependabot[bot] commented 1 year ago

Bumps useink from 0.1.0-beta.4 to 0.1.0-beta.12.

Release notes

Sourced from useink's releases.

Add improvements to wallet hooks

  • Add hook to get all supported wallets
  • Check if account has been enabled before setting it in state

v0.1.0-beta.11

Add isConnected boolean to WalletState.

e.g. const { isConnected } = useWallet()

v0.1.0-beta.10

Add hooks for getting installed and uninstalled wallets.

Add Better Chain Config and Notification System

  • Add almost 300 chain configurations. This was modified from TalismanSociety/chaindata.
  • Move NotificationProvider outside of core lib, and add improvements for managing snackbar-type notifications

Add Talisman Wallet Connect

  • Add Talisman wallet connect
  • Add wallet subscriptions for real time updates
  • Rename hooks

v0.1.0-beta.7

Add multi-chain support

This release adds the ability to use hooks for specific chains that are configured in the ConfigProvider. At least one chain must be configured, but more than one are possible. For any hook that reads from a specific chain you have the option of passing in the name of the chain. If no argument is given, then the default chain will be used. The default chain is simply the first item in the chain config list.

For example, if the configuration is set up like this:

import { ContractsRococo, Shibuya, Astar, Phala, AlephZero } from 'useink/chains';
    // ... omitted
    <UseInkProvider
      config={{
        chains: [ContractsRococo, Shibuya, Astar, Phala, AlephZero],
      }}
    >
      <Component {...pageProps} />
    </UseInkProvider>
    // ... omitted
  • useBalance(address) will return the balance of the address for ContractsRococo.
  • useBalanace(address, 'AlephZero') will return the balance for Aleph Zero
  • Chain names are typed based on the definitions in chains/types.ts
  • useBalanace(address, 'Development') would not work because it is not configured in the ConfigProvider even though it is a valid type

This is true for all hooks. If they take a chain name as an argument then any falsy value will use the default chain. This is important because many Dapps do will only care about a single chain and it would be tedious to manually add the chain name every time.

  • ApiProvider maintains a map of api providers for each chain that is configured. useApis(), useApi() (returns api for default chain), and useApi('Shubuya') are both valid
  • BlockHeaderProvider maintains a map of blockHeader for each chain that is configured. useBlockHeaders(), useBlockHeader() (default chain), and useBlockHeader('Phala') are all valid.

... (truncated)

Commits
  • a64c890 feat: check if account is enabled
  • 258f116 feat: add useAllWallets
  • 26f160b feat: add isConnected to WalletState
  • 186e07d feat: add wallet hooks
  • 87258e3 feat: add NotificationProvider
  • 9d8aca4 feat: update chain types using as const
  • fe293f2 feat: add chain config
  • 7ae6dc0 feat: use talisman/wallet-connect as dependency
  • 2b2fc8f feat: rename contractEvents to events
  • 65a154c feat: rename contractTx to tx
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
netlify[bot] commented 1 year ago

Deploy Preview for inklink failed.

Name Link
Latest commit 2fb34b3c2e966c6048ebc2ba6582bdbdd074384c
Latest deploy log https://app.netlify.com/sites/inklink/deploys/645ad0ac463a81000705cd13
dependabot[bot] commented 1 year ago

Superseded by #255.