Skip to content

Commit

Permalink
fix: deprecate `Account[Create|Update]Transaction.Set[Send|Receive]Re…
Browse files Browse the repository at this point in the history
…cordThreshold()`
  • Loading branch information
janaakhterov committed Sep 28, 2020
1 parent 0d1c09d commit 33a48ab
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions account_create_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,17 @@ func (builder AccountCreateTransaction) SetAutoRenewPeriod(autoRenewPeriod time.

// SetSendRecordThreshold sets the threshold amount for which an account record is created for any send/withdraw
// transaction
//
// Deprecated: No longer used by Hedera
func (builder AccountCreateTransaction) SetSendRecordThreshold(recordThreshold Hbar) AccountCreateTransaction {
builder.pb.SendRecordThreshold = uint64(recordThreshold.AsTinybar())
return builder
}

// SetReceiveRecordThreshold sets the threshold amount for which an account record is created for any receive/deposit
// transaction
//
// Deprecated: No longer used by Hedera
func (builder AccountCreateTransaction) SetReceiveRecordThreshold(recordThreshold Hbar) AccountCreateTransaction {
builder.pb.ReceiveRecordThreshold = uint64(recordThreshold.AsTinybar())
return builder
Expand Down
4 changes: 4 additions & 0 deletions account_update_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ func (builder AccountUpdateTransaction) SetReceiverSignatureRequired(required bo

// SetSendRecordThreshold sets the threshold amount for which an account record is created for any send/withdraw
// transaction
//
// Deprecated: No longer used by Hedera
func (builder AccountUpdateTransaction) SetSendRecordThreshold(threshold Hbar) AccountUpdateTransaction {
builder.pb.SendRecordThresholdField = &proto.CryptoUpdateTransactionBody_SendRecordThreshold{
SendRecordThreshold: uint64(threshold.AsTinybar()),
Expand All @@ -85,6 +87,8 @@ func (builder AccountUpdateTransaction) SetSendRecordThreshold(threshold Hbar) A

// SetReceiveRecordThreshold sets the threshold amount for which an account record is created for any receive/deposit
// transaction
//
// Deprecated: No longer used by Hedera
func (builder AccountUpdateTransaction) SetReceiveRecordThreshold(threshold Hbar) AccountUpdateTransaction {
builder.pb.ReceiveRecordThresholdField = &proto.CryptoUpdateTransactionBody_ReceiveRecordThreshold{
ReceiveRecordThreshold: uint64(threshold.AsTinybar()),
Expand Down

0 comments on commit 33a48ab

Please sign in to comment.