Skip to content

Conversation

@gabrielbazan7
Copy link

No description provided.

micahriggan and others added 30 commits August 13, 2019 10:45
Can now sync ETH and get wallet history for ERC20 tokens
ETH blocks were using the BTC transforms, fixed that
});
let rawBody, headers;

try {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we just re-throw the error, we can remove this try catch, and just use

let { rawBody, headers } = await PayProV2._asyncRequest({

});
}) {
let rawBody, headers;
try {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing here

})
});
let rawBody, headers;
try {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing here

})
});
let rawBody, headers;
try {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

}

let payProDetails;
try {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

// BTC Response - ETH Response
if (_.has(responseData, 'instructions[0].requiredFeeRate')) {
const requiredFeeRate = responseData.instructions[0].requiredFeeRate;
if (requiredFeeRate > MAX_FEE_PER_KB) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this currency specific?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to change it for:

MAX_FEE_PER_KB: {
   btc: 10000 * 1000, // 10k sat/b
   bch: 10000 * 1000, // 10k sat/b
   eth: 50000000000, // 50 Gwei
 },

Thanks

}

// ETH Response
if (_.has(responseData, 'instructions[0].value')) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're going to want to loop through the instructions and build a transaction per instruction, rather than get the first index.

@gabrielbazan7 gabrielbazan7 force-pushed the feat/payprov2 branch 11 times, most recently from 9e5eaf0 to bd53fa2 Compare October 7, 2019 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants