Giter Club home page Giter Club logo

ts-library's People

Contributors

deliriusz avatar dependabot[bot] avatar geoist1 avatar idrisssystem avatar lennardevertz avatar matrix0123456789 avatar nemmtor 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

ts-library's Issues

transferToIDriss() always asks for approval to spend erc20

Describe the bug
When calling the tipping function transferToIDriss() with ERC20 (+ nft?), the getApproval function of the respective asset is called even though an approval previously given exists.

To Reproduce

  1. go to IDriss Send
  2. Enter someones Twitter name
  3. Select USDC (or any other token) on Polygon
  4. Approve spending
  5. decline actual transaction and restart at 1.

Expected behavior
When an approval exists, we should not ask to approve again.

allow wallet address input in multitransferToIDriss and transferToIDriss

Is your feature request related to a problem? Please describe.
Specifically when using multiSend, it is still common (if not the standard), to use wallet addresses (or ENS names -> resolving takes place on the front end?) as identifiers. If no reverse record is set up for a given address, we currently cannot pass this identifier to multitransferToIDriss().

Describe the solution you'd like
beneficiary in sendParams should also accept evm compatible wallet addresses.

Describe alternatives you've considered
ENS names should also be accepted. there could either be front-end resolving which just passes the address as beneficiary, or a separate ENS resolver in the library. For simplicity, I recommend using front-end resolving for now.

Add makePayment() to registration flow

The current registration flow requires a front-end to manually build a transaction with

await paymentContract.methods.payNative(receipt_hash, idHash, "IDriss").send({
                    from: selectedAccount,
                    value: 0,
                    gasPrice: valid.gas,
                    gas: GAS_LIMIT_PAY_NATIVE
                });

where all values are calculated in a front end. This can be simplified for everyone by just creating a makePayment() function which accepts a web3Prover, calculates everything and triggers the payment.

AssetType

I tried to import the AssetType this way

import { AssetType } from "idriss-crypto/lib/types/assetType";

but I'm getting this error

Module not found: Package path ./lib/types/assetType is not exported from package

estimateGas fails for custom data

Describe the bug
Transactions fail due to transaction underpriced or other errors. Origin is most likely found in transactionOptions.gas, which was historically set to some default value.

To Reproduce
Open IDriss Send and try to send something to more than 5 identifiers.

Expected behavior
Gas should be calculated correctly with contract.methods.methodName().estimateGas() so that the gas option can be left out in the library call.

multitransferToIDriss() returns just one transaction receipt

Describe the bug
When calling multitransferToIDriss() with handles that are registered AND others that are not registered, two transactions are triggered. Only the latter one (transaction to un-registered IDriss handles) is returned from multitransferToIDriss()

To Reproduce
Steps to reproduce the behavior:
Call multitransferToIDriss() using an existing, and a new handle.

Expected behavior
While the more critical transaction hash is returned, an array of transaction receipts should be returned for completeness.

Update readme to reflect newest changes

Is your feature request related to a problem? Please describe.
This library has new features that are not added to the readme documentation yet.

Describe the solution you'd like
Add revertPayment() documentation as well as info that addresses are accepted.

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.