Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
c3c98463
Commit
c3c98463
authored
Mar 07, 2019
by
Sergei Zubov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update estimate-tx and build-tx
parent
07b3c2ce
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
21 deletions
+48
-21
main.ts
Breeze.UI/main.ts
+2
-2
fee-estimation.ts
Breeze.UI/src/app/shared/classes/fee-estimation.ts
+10
-7
transaction-building.ts
Breeze.UI/src/app/shared/classes/transaction-building.ts
+27
-5
api.service.ts
Breeze.UI/src/app/shared/services/api.service.ts
+3
-3
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+6
-4
No files found.
Breeze.UI/main.ts
View file @
c3c98463
...
...
@@ -100,7 +100,7 @@ app.on('window-all-closed', function () {
}
})
.
then
(
response
=>
app
.
quit
())
.
catch
(
error
=>
setTimeout
(()
=>
app
.
quit
(),
5000
));
.
catch
(
error
=>
setTimeout
(()
=>
app
.
quit
(),
5000
));
}
});
...
...
@@ -123,7 +123,7 @@ function startDeStreamApi() {
}
else
if
(
os
.
platform
()
===
'linux'
)
{
apiPath
=
path
.
resolve
(
__dirname
,
'..//..//resources//daemon//DeStream.BreezeD'
);
}
else
{
apiPath
=
path
.
resolve
(
__dirname
,
'..//..//resources//daemon//DeStream.
Breeze
D'
);
apiPath
=
path
.
resolve
(
__dirname
,
'..//..//resources//daemon//DeStream.
DeStream
D'
);
}
if
(
!
testnet
)
{
...
...
Breeze.UI/src/app/shared/classes/fee-estimation.ts
View file @
c3c98463
import
{
OutpointRequest
}
from
'../../shared/classes/transaction-building'
;
import
{
RecipientModel
}
from
'../../shared/classes/transaction-building'
;
export
class
FeeEstimation
{
constructor
(
walletName
:
string
,
accountName
:
string
,
destinationAddress
:
string
,
amount
:
string
,
feeType
:
string
,
allowUnconfirmed
:
boolean
)
{
constructor
(
walletName
:
string
,
accountName
:
string
,
outpoints
:
OutpointRequest
[],
recipients
:
RecipientModel
[]
,
feeType
:
string
,
allowUnconfirmed
:
boolean
)
{
this
.
walletName
=
walletName
;
this
.
accountName
=
accountName
;
this
.
destinationAddress
=
destinationAddres
s
;
this
.
amount
=
amount
;
this
.
outpoints
=
outpoint
s
;
this
.
recipients
=
recipients
;
this
.
feeType
=
feeType
;
this
.
allowUnconfirmed
=
allowUnconfirmed
;
}
walletName
:
string
;
accountName
:
string
;
destinationAddress
:
string
;
amount
:
string
;
feeType
:
string
;
allowUnconfirmed
:
boolean
;
outpoints
:
OutpointRequest
[];
recipients
:
RecipientModel
[];
}
\ No newline at end of file
Breeze.UI/src/app/shared/classes/transaction-building.ts
View file @
c3c98463
export
class
TransactionBuilding
{
constructor
(
walletName
:
string
,
accountName
:
string
,
password
:
string
,
destinationAddress
:
string
,
amount
:
string
,
feeType
:
string
,
allowUnconfirmed
:
boolean
)
{
constructor
(
walletName
:
string
,
accountName
:
string
,
password
:
string
,
outpoints
:
OutpointRequest
[],
recipients
:
RecipientModel
[]
,
feeType
:
string
,
allowUnconfirmed
:
boolean
)
{
this
.
walletName
=
walletName
;
this
.
accountName
=
accountName
;
this
.
password
=
password
;
this
.
destinationAddress
=
destinationAddres
s
;
this
.
amount
=
amount
;
this
.
outpoints
=
outpoint
s
;
this
.
recipients
=
recipients
;
this
.
feeType
=
feeType
;
this
.
allowUnconfirmed
=
allowUnconfirmed
;
}
...
...
@@ -13,8 +13,30 @@ export class TransactionBuilding {
walletName
:
string
;
accountName
:
string
;
password
:
string
;
destinationAddress
:
string
;
amount
:
string
;
feeType
:
string
;
allowUnconfirmed
:
boolean
;
outpoints
:
OutpointRequest
[];
recipients
:
RecipientModel
[];
}
export
class
OutpointRequest
{
constructor
(
transactionId
:
string
,
index
:
number
)
{
this
.
transactionId
=
transactionId
;
this
.
index
=
index
;
}
transactionId
:
string
;
index
:
number
;
}
export
class
RecipientModel
{
constructor
(
destinationAddress
:
string
,
amount
:
string
)
{
this
.
destinationAddress
=
destinationAddress
;
this
.
amount
=
amount
;
}
destinationAddress
:
string
;
amount
:
string
;
}
Breeze.UI/src/app/shared/services/api.service.ts
View file @
c3c98463
...
...
@@ -15,7 +15,7 @@ import { WalletLoad } from '../classes/wallet-load';
import
{
WalletInfo
}
from
'../classes/wallet-info'
;
import
{
Mnemonic
}
from
'../classes/mnemonic'
;
import
{
FeeEstimation
}
from
'../classes/fee-estimation'
;
import
{
TransactionBuilding
}
from
'../classes/transaction-building'
;
import
{
RecipientModel
,
TransactionBuilding
}
from
'../classes/transaction-building'
;
import
{
TransactionSending
}
from
'../classes/transaction-sending'
;
/**
...
...
@@ -199,8 +199,8 @@ export class ApiService {
let
params
:
URLSearchParams
=
new
URLSearchParams
();
params
.
set
(
'walletName'
,
data
.
walletName
);
params
.
set
(
'accountName'
,
data
.
accountName
);
params
.
set
(
'
destinationAddress'
,
data
.
destinationAddress
);
params
.
set
(
'
amount'
,
data
.
amount
);
params
.
set
(
'
recipients[0].destinationAddress'
,
data
.
recipients
[
0
]
.
destinationAddress
);
params
.
set
(
'
recipients[0].amount'
,
data
.
recipients
[
0
]
.
amount
);
params
.
set
(
'feeType'
,
data
.
feeType
);
params
.
set
(
'allowUnconfirmed'
,
"true"
);
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
c3c98463
...
...
@@ -10,6 +10,8 @@ import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import
{
FeeEstimation
}
from
'../../shared/classes/fee-estimation'
;
import
{
TransactionBuilding
}
from
'../../shared/classes/transaction-building'
;
import
{
OutpointRequest
}
from
'../../shared/classes/transaction-building'
;
import
{
RecipientModel
}
from
'../../shared/classes/transaction-building'
;
import
{
TransactionSending
}
from
'../../shared/classes/transaction-sending'
;
import
{
SendConfirmationComponent
}
from
'./send-confirmation/send-confirmation.component'
;
...
...
@@ -141,8 +143,8 @@ export class SendComponent implements OnInit {
let
transaction
=
new
FeeEstimation
(
this
.
globalService
.
getWalletName
(),
"account 0"
,
this
.
sendForm
.
get
(
"address"
).
value
.
trim
()
,
this
.
sendForm
.
get
(
"amount"
).
value
,
[]
,
new
Array
<
RecipientModel
>
(
new
RecipientModel
(
this
.
sendForm
.
get
(
"address"
).
value
.
trim
(),
this
.
sendForm
.
get
(
"amount"
).
value
))
,
this
.
sendForm
.
get
(
"fee"
).
value
,
true
);
...
...
@@ -180,8 +182,8 @@ export class SendComponent implements OnInit {
this
.
globalService
.
getWalletName
(),
"account 0"
,
this
.
sendForm
.
get
(
"password"
).
value
,
this
.
sendForm
.
get
(
"address"
).
value
.
trim
()
,
this
.
sendForm
.
get
(
"amount"
).
value
,
[]
,
new
Array
<
RecipientModel
>
(
new
RecipientModel
(
this
.
sendForm
.
get
(
"address"
).
value
.
trim
(),
this
.
sendForm
.
get
(
"amount"
).
value
))
,
this
.
sendForm
.
get
(
"fee"
).
value
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment