From 53503c6e218f02a6d3b1eec99fa979844c27e85b Mon Sep 17 00:00:00 2001 From: vrolland Date: Mon, 27 Apr 2020 11:31:10 +0200 Subject: [PATCH 1/3] small payment docs fix --- packages/docs/docs/guides/4-request-payment/1-multisig.ts | 1 - packages/payment-processor/src/payment/erc20-proxy.ts | 3 --- 2 files changed, 4 deletions(-) diff --git a/packages/docs/docs/guides/4-request-payment/1-multisig.ts b/packages/docs/docs/guides/4-request-payment/1-multisig.ts index edab2a281d..29022b6dcd 100644 --- a/packages/docs/docs/guides/4-request-payment/1-multisig.ts +++ b/packages/docs/docs/guides/4-request-payment/1-multisig.ts @@ -7,7 +7,6 @@ import { Contract, ContractTransaction, Signer } from 'ethers'; -// TODO export this from @requestnetwork/payment-processor import { encodeApproveErc20, encodePayErc20Request, diff --git a/packages/payment-processor/src/payment/erc20-proxy.ts b/packages/payment-processor/src/payment/erc20-proxy.ts index 43b405abc6..9c1b647b1e 100644 --- a/packages/payment-processor/src/payment/erc20-proxy.ts +++ b/packages/payment-processor/src/payment/erc20-proxy.ts @@ -45,7 +45,6 @@ export async function payErc20ProxyRequest( /** * Encodes the call to pay a request through the ERC20 proxy contract, can be used with a Multisig contract. * @param request request to pay - * @param multisigAddress multisig contract used to pay the request. * @param signerOrProvider the Web3 provider, or signer. Defaults to window.ethereum. * @param amount optionally, the amount to pay. Defaults to remaining amount of the request. */ @@ -94,7 +93,6 @@ export async function hasErc20Approval( /** * Processes the approval transaction of the targeted ERC20. * @param request request to pay - * @param account account that will be used to pay the request * @param provider the web3 provider. Defaults to Etherscan. * @param overrides optionally, override default transaction values, like gas. */ @@ -118,7 +116,6 @@ export async function approveErc20( /** * Encodes the approval call, can be used with a Multisig contract. * @param request the request to pay - * @param multisigAddress multisig contract for which to approve the ERC20 * @param signerOrProvider the Web3 provider, or signer. Defaults to window.ethereum. */ export function encodeApproveErc20( From 29c9499d0d29f23ff3d2eeeb45b97004cda400cf Mon Sep 17 00:00:00 2001 From: vrolland Date: Mon, 27 Apr 2020 11:43:15 +0200 Subject: [PATCH 2/3] update doc --- .../docs/guides/4-request-payment/1-multisig.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/docs/docs/guides/4-request-payment/1-multisig.ts b/packages/docs/docs/guides/4-request-payment/1-multisig.ts index 29022b6dcd..5faf018f0d 100644 --- a/packages/docs/docs/guides/4-request-payment/1-multisig.ts +++ b/packages/docs/docs/guides/4-request-payment/1-multisig.ts @@ -1,8 +1,11 @@ /** - * # Multisig payments for ERC20 + * # Pay a request with a Multisig * * ## Pay through a proxy-contract with a multisig - * Imports + * + * It is planned to embedded the payment through mutlisig contracts in the payment-processor package. But, for now, it needs to be done manually. + * + * The imports you will need: */ import { Contract, ContractTransaction, Signer } from 'ethers'; @@ -15,7 +18,7 @@ import { getRequestPaymentValues } from '@requestnetwork/payment-processor/dist/ import { ClientTypes } from '@requestnetwork/types'; /** - * [Gnosis multisig](https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol) partial abi + * In this example, we will use the [Gnosis multisig](https://github.com/gnosis/MultiSigWallet/blob/master/contracts/MultiSigWallet.sol). here its partial abi: */ const multisigAbi = [ 'function submitTransaction(address _destination, uint _value, bytes _data) returns (uint)', @@ -36,7 +39,8 @@ export const payEthWithMultisig = async ( }; /** - * ### Approve ERC20 spending + * ### Pay ERC20 request + * #### Approve ERC20 spending */ export const approveErc20WithMultisig = async ( request: ClientTypes.IRequestData, @@ -49,7 +53,7 @@ export const approveErc20WithMultisig = async ( return multisigContract.submitTransaction(tokenAddress, 0, encodeApproveErc20(request, signer)); }; /** - * ### Pay ERC20 request + * #### Pay ERC20 request */ export const payErc20WithMultisig = async ( request: ClientTypes.IRequestData, From b4a314adb362f4a8a5203968ac044db631250f76 Mon Sep 17 00:00:00 2001 From: vrolland Date: Mon, 27 Apr 2020 11:46:36 +0200 Subject: [PATCH 3/3] from BLE review --- packages/docs/docs/guides/4-request-payment/1-multisig.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/docs/docs/guides/4-request-payment/1-multisig.ts b/packages/docs/docs/guides/4-request-payment/1-multisig.ts index 5faf018f0d..4036c03759 100644 --- a/packages/docs/docs/guides/4-request-payment/1-multisig.ts +++ b/packages/docs/docs/guides/4-request-payment/1-multisig.ts @@ -3,8 +3,6 @@ * * ## Pay through a proxy-contract with a multisig * - * It is planned to embedded the payment through mutlisig contracts in the payment-processor package. But, for now, it needs to be done manually. - * * The imports you will need: */