Skip to content

v0.13.0

Compare
Choose a tag to compare
@JakeUrban JakeUrban released this 03 Aug 22:14
· 370 commits to master since this release
fd6318c

This release contains many breaking changes, all in preparation for 1.0.

DB Changes

  • Asset.withdraw_anchor_account and sender_anchor_account have been merged into receiving_anchor_account
  • Transaction.deposit_memo, withdraw_memo, and send_memo have been merged into memo
  • Transaction.deposit_memo_type, withdraw_memo_type, and send_memo_type have been merged into memo_type
  • Asset.send_fee_percent and send_fee_fixed were given defaults of 0 instead of being nullable

Breaking Changes

General:

  • Some keyword arguments for register_integrations() have been changed
    • toml_func --> toml
    • fee_func --> fee
    • scripts_func --> scripts,
    • info --> sep6_info
    • send --> sep31_receiver
  • Transaction.amount_fee must be calculated by the anchor from poll_pending_deposits() or execute_outgoing_transactions()
    • Polaris will still attempt to calculate Transaction.amount_fee if there is no registered fee function
  • PROJECT_ROOT is no longer used from settings.py. Polaris will now use BASE_DIR by default and ENV_PATH if specified.

SEP 6 & 24:

  • content_for_transaction() has been replaced by two functions
    • form_for_transaction(): returns the next form to be served to the user during the interactive flow
    • content_for_template(): returns a dictionary containing customizable attributes for the template to be rendered to the user
    • This was implemented so content_for_template() could be called for requests to Polaris transaction/more_info endpoint
  • Added icon_path field to the list of allowed keys-value pairs returned from content_for_template()
    • If not present, Polaris will try to use the ORG_LOGO URL returned from the anchor's registered toml function
    • This replaces the need to create a company_icon.svg file
  • process_sep6_request() is now passed an unsaved Transaction object representing the transaction to be created
    • the transaction passed should only be saved if the request is valid

SEP31:

  • The SEP-31 API itself was changed. See the changes to understand why some of the following Polaris changes were made
  • SendIntegration has been renamed to SEP31ReceiverIntegration following related changes to the SEP
    • process_send_request() --> process_post_request()
    • process_update_request() --> process_patch_request()
  • process_post_request() is now passed an unsaved Transaction object instead of the transaction ID
    • This mirrors the solution implemented for process_sep6_request()

Bug Fixes

  • Added SEP-31 transactions query for most-recently completed transactions (used in watch_transactions)
  • SEP-10 no longer attempts to decode request bodies manually (this was a problem when using charset in request headers)
  • Polaris no longer uses hard-coded XDR error strings to detect errors when making SEP-24 deposits
  • Polaris now uses the correct fee columns on the Transaction when users don't calculate the fee themselves