Skip to content

Commit

Permalink
update ipfs hash and proxy changes in tinlakejs
Browse files Browse the repository at this point in the history
  • Loading branch information
AStox committed Dec 3, 2023
1 parent 63d9474 commit 14016c9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tinlake-ui-deploy-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL: 'https://rwamarket.io'
NEXT_PUBLIC_POOL_REGISTRY: '0xddf1c516cf87126c6c610b52fd8d609e67fb6033'
NEXT_PUBLIC_POOLS_CONFIG: 'mainnetProduction'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmfShrE7bvcjiyiBjyyzfJz6dFtZ8RLdoHHA9bG1GFZzby'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmX5i85itxTPmTZDxvm4Rakhb23FawrLp4r4YrgjWjLJVj'
NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f'
NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json'
NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tinlake-ui-deploy-to-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL: 'https://rwamarket.io'
NEXT_PUBLIC_POOL_REGISTRY: '0xddf1c516cf87126c6c610b52fd8d609e67fb6033'
NEXT_PUBLIC_POOLS_CONFIG: 'mainnetProduction'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmfShrE7bvcjiyiBjyyzfJz6dFtZ8RLdoHHA9bG1GFZzby'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmX5i85itxTPmTZDxvm4Rakhb23FawrLp4r4YrgjWjLJVj'
NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f'
NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json'
NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tinlake-ui-deploy-to-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL: 'https://rwamarket.io'
NEXT_PUBLIC_POOL_REGISTRY: '0xddf1c516cf87126c6c610b52fd8d609e67fb6033'
NEXT_PUBLIC_POOLS_CONFIG: 'mainnetProduction'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmfShrE7bvcjiyiBjyyzfJz6dFtZ8RLdoHHA9bG1GFZzby'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmX5i85itxTPmTZDxvm4Rakhb23FawrLp4r4YrgjWjLJVj'
NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f'
NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json'
NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tinlake-ui-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
NEXT_PUBLIC_RWA_MARKET_ONBOARD_RETURN_URL: 'https://rwamarket.io'
NEXT_PUBLIC_POOL_REGISTRY: '0xddf1c516cf87126c6c610b52fd8d609e67fb6033'
NEXT_PUBLIC_POOLS_CONFIG: 'mainnetProduction'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmfShrE7bvcjiyiBjyyzfJz6dFtZ8RLdoHHA9bG1GFZzby'
NEXT_PUBLIC_POOLS_IPFS_HASH_OVERRIDE: 'QmX5i85itxTPmTZDxvm4Rakhb23FawrLp4r4YrgjWjLJVj'
NEXT_PUBLIC_PORTIS_KEY: 'bc9e2922-2ebd-4e2b-86f6-7c7855bdf07f'
NEXT_PUBLIC_REWARDS_TREE_URL: 'https://storage.googleapis.com/rad-rewards-trees-mainnet-production/latest.json'
NEXT_PUBLIC_RPC_URL: 'https://mainnet.infura.io/v3/ed5e0e19bcbc427cbf8f661736d44516'
Expand Down
2 changes: 2 additions & 0 deletions tinlake.js/src/abi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,6 @@ export default {
BORROWER_PROXY: contractAbiBorrowerProxy,
ASSET_NFT: contractAbiNFTRegistry,
MINTER: contractAbiNFTMinter,
LEGACY_ACTIONS: contractAbiActions,
LEGACY_PROXY_REGISTRY: contractAbiProxyRegistry,
} as ContractAbis
18 changes: 6 additions & 12 deletions tinlake.js/src/actions/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,7 @@ export function ProxyActions<ActionsBase extends Constructor<TinlakeParams>>(Bas
amount,
])

const owner = this.contract('TITLE').ownerOf(loanId).toString()

if (this.contractAddresses['BORROWER_PROXY'] && owner === this.contractAddresses['BORROWER_PROXY']) {
if (this.contractAddresses['BORROWER_PROXY'] && proxyAddress === this.contractAddresses['BORROWER_PROXY']) {
return this.pending(
this.contract('BORROWER_PROXY').userExecute(this.contract('ACTIONS').address, encoded, {
...this.overrides,
Expand All @@ -190,7 +188,7 @@ export function ProxyActions<ActionsBase extends Constructor<TinlakeParams>>(Bas
)
}

if (this.contractAddresses['BORROWER_PROXY'] && owner !== this.contractAddresses['BORROWER_PROXY']) {
if (this.contractAddresses['BORROWER_PROXY'] && proxyAddress !== this.contractAddresses['BORROWER_PROXY']) {
return this.pending(
this.contract('PROXY', proxyAddress).execute(this.contract('LEGACY_ACTIONS').address, encoded, {
...this.overrides,
Expand All @@ -213,9 +211,7 @@ export function ProxyActions<ActionsBase extends Constructor<TinlakeParams>>(Bas
loanId,
])

const owner = this.contract('TITLE').ownerOf(loanId).toString()

if (this.contractAddresses['BORROWER_PROXY'] && owner === this.contractAddresses['BORROWER_PROXY']) {
if (this.contractAddresses['BORROWER_PROXY'] && proxyAddress === this.contractAddresses['BORROWER_PROXY']) {
return this.pending(
this.contract('BORROWER_PROXY').userExecute(this.contract('ACTIONS').address, encoded, {
...this.overrides,
Expand All @@ -224,7 +220,7 @@ export function ProxyActions<ActionsBase extends Constructor<TinlakeParams>>(Bas
)
}

if (this.contractAddresses['BORROWER_PROXY'] && owner !== this.contractAddresses['BORROWER_PROXY']) {
if (this.contractAddresses['BORROWER_PROXY'] && proxyAddress !== this.contractAddresses['BORROWER_PROXY']) {
return this.pending(
this.contract('PROXY', proxyAddress).execute(this.contract('LEGACY_ACTIONS').address, encoded, {
...this.overrides,
Expand All @@ -251,9 +247,7 @@ export function ProxyActions<ActionsBase extends Constructor<TinlakeParams>>(Bas
loanId,
])

const owner = this.contract('TITLE').ownerOf(loanId).toString()

if (this.contractAddresses['BORROWER_PROXY'] && owner === this.contractAddresses['BORROWER_PROXY']) {
if (this.contractAddresses['BORROWER_PROXY'] && proxyAddress === this.contractAddresses['BORROWER_PROXY']) {
return this.pending(
this.contract('BORROWER_PROXY').userExecute(this.contract('ACTIONS').address, encoded, {
...this.overrides,
Expand All @@ -262,7 +256,7 @@ export function ProxyActions<ActionsBase extends Constructor<TinlakeParams>>(Bas
)
}

if (this.contractAddresses['BORROWER_PROXY'] && owner !== this.contractAddresses['BORROWER_PROXY']) {
if (this.contractAddresses['BORROWER_PROXY'] && proxyAddress !== this.contractAddresses['BORROWER_PROXY']) {
return this.pending(
this.contract('PROXY', proxyAddress).execute(this.contract('LEGACY_ACTIONS').address, encoded, {
...this.overrides,
Expand Down

0 comments on commit 14016c9

Please sign in to comment.