Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Cosmos JS #1746

Merged
merged 62 commits into from Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
9ff6edc
increase gas amplifier
alexalouit Jan 31, 2022
bb1888b
fix payload construction
alexalouit Jan 31, 2022
92f4d59
More accurate gas amplifier
alexalouit Jan 31, 2022
f29a4ae
increase gas amplifier
alexalouit Jan 31, 2022
957a48f
use same node for calculation and broadcast
alexalouit Jan 31, 2022
b120a76
fix amount payload
alexalouit Jan 31, 2022
dd45d6d
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Jan 31, 2022
aaa9494
fix fees/gas calculation
alexalouit Jan 31, 2022
67a4414
fix signature
alexalouit Feb 1, 2022
510c1e9
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 1, 2022
0594ce0
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 3, 2022
75bd779
fix fees regression
alexalouit Feb 3, 2022
fff173f
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 3, 2022
014b551
More accurate pubkey selection
alexalouit Feb 3, 2022
bed90f0
don't use extra.tx_bytes
alexalouit Feb 3, 2022
4faf89d
fix pubkey selection
alexalouit Feb 3, 2022
a49d4ff
simplify hex serialization
alexalouit Feb 4, 2022
e8ad8f3
update transaction: more strict types
alexalouit Feb 10, 2022
a03fd8f
many things
alexalouit Feb 10, 2022
27947b3
accuracy
alexalouit Feb 10, 2022
1ea1afe
remove useless isPreValidation
alexalouit Feb 10, 2022
f941d07
fix strange edge effect of ledger live desktop
alexalouit Feb 10, 2022
cda9bc1
Update xpub during sync
alexalouit Feb 14, 2022
d65266d
temporary enable log for bot
alexalouit Feb 14, 2022
1c62e0c
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 14, 2022
8df4111
LL-9159 cosmos node
alexalouit Feb 16, 2022
804fccd
Update js-signOperation.ts
alexalouit Feb 16, 2022
35ecf59
fix signature
alexalouit Feb 16, 2022
f45276e
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 17, 2022
99dc488
fix redelegate payload
alexalouit Feb 17, 2022
1800f02
fix payload send transaction when sendmax
alexalouit Feb 17, 2022
3aca833
fix optimistic operation type
alexalouit Feb 18, 2022
e22a144
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 18, 2022
e7fd38b
fix typo
alexalouit Feb 18, 2022
c7a0e69
bugfix
alexalouit Feb 18, 2022
b64368e
fix regression
alexalouit Feb 18, 2022
523f73f
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 18, 2022
992193f
update optimistic operation
alexalouit Feb 18, 2022
e81b5d3
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 18, 2022
71ea6f8
fix prettier
alexalouit Feb 18, 2022
e0f4fce
more deterministic transaction parsing
alexalouit Feb 18, 2022
96591a7
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 18, 2022
0d409ca
clarify code readable
alexalouit Feb 18, 2022
2823fcd
adjust sender and recipient
alexalouit Feb 18, 2022
fd3f0aa
fix fees when is ibc transaction
alexalouit Feb 18, 2022
6685baa
fix redelegations data mapping
alexalouit Feb 19, 2022
892148b
fix mixed styles
alexalouit Feb 21, 2022
7446337
fix array cast type
alexalouit Feb 21, 2022
d0819d0
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 21, 2022
890c0d4
fix more determinist operation data
alexalouit Feb 21, 2022
289ef6d
fix could not find optimisticOperation in redelegate transaction
alexalouit Feb 22, 2022
6121e72
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 22, 2022
c113968
restore getStargateRewardsState methode
alexalouit Feb 22, 2022
6c72c62
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 22, 2022
c3e6853
amount of the operation more close
alexalouit Feb 25, 2022
6631073
return transaction in prepareTransaction
alexalouit Feb 25, 2022
a4b0c61
keep immutable paradigm for prepareTransaction
alexalouit Feb 25, 2022
b5e6e7f
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 25, 2022
8780fb4
fix amount update in prepareTransaction
alexalouit Feb 25, 2022
e6637dd
fix amount control to be more specific
alexalouit Feb 25, 2022
c0b2f6b
Merge remote-tracking branch 'upstream/cosmos-js' into cosmos-js
alexalouit Feb 25, 2022
774230a
fix BigNumber compare
alexalouit Feb 25, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/families/cosmos/js-buildTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const buildTransaction = async (

switch (transaction.mode) {
case "send":
if (!transaction.recipient || !transaction.amount) {
if (!transaction.recipient || transaction.amount.lte(0)) {
isComplete = false;
} else {
msg.push({
Expand All @@ -39,7 +39,7 @@ const buildTransaction = async (
isComplete = false;
} else {
transaction.validators.forEach((validator) => {
if (!validator.address || !validator.amount) {
if (!validator.address || validator.amount.lte(0)) {
isComplete = false;
}

Expand All @@ -63,7 +63,7 @@ const buildTransaction = async (
!transaction.validators ||
transaction.validators.length < 1 ||
!transaction.validators[0].address ||
!transaction.validators[0].amount
transaction.validators[0].amount.lte(0)
) {
isComplete = false;
} else {
Expand All @@ -87,7 +87,7 @@ const buildTransaction = async (
!transaction.validators ||
transaction.validators.length < 1 ||
!transaction.validators[0].address ||
!transaction.validators[0].amount
transaction.validators[0].amount.lte(0)
) {
isComplete = false;
} else {
Expand Down Expand Up @@ -129,7 +129,7 @@ const buildTransaction = async (
!transaction.validators ||
transaction.validators.length < 1 ||
!transaction.validators[0].address ||
!transaction.validators[0].amount
transaction.validators[0].amount.lte(0)
) {
isComplete = false;
} else {
Expand Down
7 changes: 4 additions & 3 deletions src/families/cosmos/js-prepareTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ const prepareTransaction = async (

if (
transaction.memo !== memo ||
transaction.fees !== fees ||
transaction.gas !== gas
!fees.eq(transaction.fees || new BigNumber(0)) ||
!gas.eq(transaction.gas || new BigNumber(0)) ||
!amount.eq(transaction.amount)
) {
return { ...transaction, memo, fees, gas };
return { ...transaction, memo, fees, gas, amount };
}

return transaction;
Expand Down