Merge
This commit is contained in:
commit
59b9167ff0
7 changed files with 47 additions and 29 deletions
|
|
@ -423,8 +423,22 @@ angular.module('copayApp.services').factory('incomingData', function($log, $stat
|
|||
function handlePayPro(payProDetails, coin) {
|
||||
var thirdPartyData = {
|
||||
id: payProDetails.name,
|
||||
details: payProDetails
|
||||
caName: payProDetails.caName,
|
||||
caTrusted: payProDetails.caTrusted,
|
||||
coin: coin,
|
||||
domain: payProDetails.domain,
|
||||
expires: payProDetails.expires,
|
||||
id: 'bip70PaymentProtocol',
|
||||
memo: payProDetails.memo,
|
||||
merchant_data: payProDetails.merchant_data,
|
||||
network: payProDetails.network,
|
||||
requiredFeeRate: payProDetails.requiredFeeRate,
|
||||
selfSigned: payProDetails.selfSigned,
|
||||
time: payProDetails.time,
|
||||
url: payProDetails.url,
|
||||
verified: payProDetails.verified
|
||||
};
|
||||
|
||||
var stateParams = {
|
||||
amount: payProDetails.amount,
|
||||
toAddr: payProDetails.toAddress,
|
||||
|
|
|
|||
|
|
@ -1,26 +1,32 @@
|
|||
'use strict';
|
||||
angular.module('copayApp.services').factory('shapeshiftService', function($http, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, platformInfo, servicesService) {
|
||||
angular.module('copayApp.services').factory('shapeshiftService', function($http, $interval, $log, lodash, moment, ongoingProcess, shapeshiftApiService, storageService, configService, incomingData, platformInfo, servicesService) {
|
||||
var root = {};
|
||||
root.ShiftState = 'Shift';
|
||||
root.withdrawalAddress = ''
|
||||
root.returnAddress = ''
|
||||
root.amount = '';
|
||||
root.marketData = {}
|
||||
this.withdrawalAddress = function(address) {
|
||||
root.withdrawalAddress = function(address) {
|
||||
root.withdrawalAddress = address;
|
||||
};
|
||||
this.returnAddress = function(address) {
|
||||
root.returnAddress = function(address) {
|
||||
root.returnAddress = address;
|
||||
};
|
||||
this.amount = function(amount) {
|
||||
root.amount = function(amount) {
|
||||
root.amount = amount;
|
||||
};
|
||||
this.fromWalletId = function(id) {
|
||||
root.fromWalletId = function(id) {
|
||||
root.fromWalletId = id;
|
||||
};
|
||||
this.toWalletId = function(id) {
|
||||
root.toWalletId = function(id) {
|
||||
root.toWalletId = id;
|
||||
};
|
||||
root.coinIn = function(coinIn) {
|
||||
root.coinIn = coinIn.toUpperCase();
|
||||
};
|
||||
root.coinOut = function(coinOut) {
|
||||
root.coinOut = coinOut.toUpperCase();
|
||||
};
|
||||
|
||||
root.getMarketDataIn = function(coin) {
|
||||
if(coin === root.coinOut) return root.getMarketData(root.coinOut, root.coinIn);
|
||||
|
|
@ -104,6 +110,7 @@ angular.module('copayApp.services').factory('shapeshiftService', function($http,
|
|||
|
||||
var shapeshiftData = {
|
||||
fromWalletId: root.fromWalletId,
|
||||
toWalletId: root.toWalletId,
|
||||
minAmount: root.marketData.minimum,
|
||||
maxAmount: root.marketData.maxLimit,
|
||||
orderId: root.depositInfo.orderId
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue