Skip to content

Commit

Permalink
fix: freezeDefault was not being set properly (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrix10 authored Jul 31, 2022
1 parent 8a93fb3 commit 3a51bc3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions token_create_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,10 @@ func (transaction *TokenCreateTransaction) _Build() *services.TransactionBody {
body.PauseKey = transaction.pauseKey._ToProtoKey()
}

if transaction.freezeDefault != nil {
body.FreezeDefault = *transaction.freezeDefault
}

return &services.TransactionBody{
TransactionFee: transaction.transactionFee,
Memo: transaction.Transaction.memo,
Expand All @@ -482,6 +486,7 @@ func (transaction *TokenCreateTransaction) Schedule() (*ScheduleCreateTransactio
func (transaction *TokenCreateTransaction) _ConstructScheduleProtobuf() (*services.SchedulableTransactionBody, error) {
body := &services.TokenCreateTransactionBody{
Name: transaction.tokenName,
Symbol: transaction.tokenSymbol,
Memo: transaction.memo,
Decimals: transaction.decimals,
TokenType: services.TokenType(transaction.tokenType),
Expand Down Expand Up @@ -536,6 +541,15 @@ func (transaction *TokenCreateTransaction) _ConstructScheduleProtobuf() (*servic
if transaction.supplyKey != nil {
body.SupplyKey = transaction.supplyKey._ToProtoKey()
}

if transaction.pauseKey != nil {
body.PauseKey = transaction.pauseKey._ToProtoKey()
}

if transaction.freezeDefault != nil {
body.FreezeDefault = *transaction.freezeDefault
}

return &services.SchedulableTransactionBody{
TransactionFee: transaction.transactionFee,
Memo: transaction.Transaction.memo,
Expand Down

0 comments on commit 3a51bc3

Please sign in to comment.